From b6fa16e1d0775c6216b7891b7b1d0baed34306e4 Mon Sep 17 00:00:00 2001 From: Gleb Kanterov Date: Wed, 8 Jan 2025 18:06:24 +0100 Subject: [PATCH] Update comments --- bundle/config/mutator/python/python_locations.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bundle/config/mutator/python/python_locations.go b/bundle/config/mutator/python/python_locations.go index 36c61632c..005ff3f50 100644 --- a/bundle/config/mutator/python/python_locations.go +++ b/bundle/config/mutator/python/python_locations.go @@ -9,7 +9,7 @@ import ( "github.com/databricks/cli/libs/dyn" ) -// generatedFileName is used as the virtual file name for YAML generated by PyDABs. +// generatedFileName is used as the virtual file name for YAML generated by Python code. // // mergePythonLocations replaces dyn.Location with generatedFileName with locations loaded // from locations.json @@ -23,9 +23,9 @@ const generatedFileName = "__generated_by_python__.yml" // // For example, with locations.json: // -// {"path": "resources.jobs.job_0", "file": "src/examples/job_0.py", "line": 3, "column": 5} -// {"path": "resources.jobs.job_0.tasks[0].task_key", "file": "src/examples/job_0.py", "line": 10, "column": 5} -// {"path": "resources.jobs.job_1", "file": "src/examples/job_1.py", "line": 5, "column": 7} +// {"path": "resources.jobs.job_0", "file": "resources/job_0.py", "line": 3, "column": 5} +// {"path": "resources.jobs.job_0.tasks[0].task_key", "file": "resources/job_0.py", "line": 10, "column": 5} +// {"path": "resources.jobs.job_1", "file": "resources/job_1.py", "line": 5, "column": 7} // // - resources.jobs.job_0.tasks[0].task_key is located at job_0.py:10:5 // @@ -70,7 +70,7 @@ func mergePythonLocations(value dyn.Value, locations *pythonLocations) (dyn.Valu newLocations = append(newLocations, newLocation) for _, location := range value.Locations() { - // When loaded, dyn.Value created by PyDABs use the virtual file path as their location, + // When loaded, dyn.Value created by Python code uses the virtual file path as their location, // we replace it with newLocation. if filepath.Base(location.File) == generatedFileName { continue