mirror of https://github.com/databricks/cli.git
Address more feedback
This commit is contained in:
parent
43ce278299
commit
bfb13afa8e
|
@ -59,7 +59,11 @@ type pythonLocationEntry struct {
|
|||
// validation errors will point to Python source code instead of generated YAML.
|
||||
func mergePythonLocations(value dyn.Value, locations *pythonLocations) (dyn.Value, error) {
|
||||
return dyn.Walk(value, func(path dyn.Path, value dyn.Value) (dyn.Value, error) {
|
||||
if newLocation, ok := findPythonLocation(locations, path); ok {
|
||||
newLocation, ok := findPythonLocation(locations, path)
|
||||
if !ok {
|
||||
return value, nil
|
||||
}
|
||||
|
||||
var newLocations []dyn.Location
|
||||
|
||||
// the first item in the list is the "last" location used for error reporting
|
||||
|
@ -76,9 +80,6 @@ func mergePythonLocations(value dyn.Value, locations *pythonLocations) (dyn.Valu
|
|||
}
|
||||
|
||||
return value.WithLocations(newLocations), nil
|
||||
} else {
|
||||
return value, nil
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue