mirror of https://github.com/databricks/cli.git
Walker -> TupleWalker
This commit is contained in:
parent
b58a6fc099
commit
6d4a7271fb
|
@ -252,7 +252,7 @@ def recursive_subtract_list(list1: List[any], list2: List[any]):
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
class Walker:
|
class TupleWalker:
|
||||||
_insert_callback = None
|
_insert_callback = None
|
||||||
_update_callback = None
|
_update_callback = None
|
||||||
_delete_callback = None
|
_delete_callback = None
|
||||||
|
@ -319,8 +319,10 @@ class Walker:
|
||||||
self.update_callback(path, o1, o2)
|
self.update_callback(path, o1, o2)
|
||||||
|
|
||||||
|
|
||||||
def walk(o1, o2, insert_callback=None, update_callback=None, delete_callback=None):
|
def tuple_walk(
|
||||||
walker = Walker(insert_callback, update_callback, delete_callback)
|
o1, o2, insert_callback=None, update_callback=None, delete_callback=None
|
||||||
|
):
|
||||||
|
walker = TupleWalker(insert_callback, update_callback, delete_callback)
|
||||||
walker.walk(o1, o2)
|
walker.walk(o1, o2)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ from typing import Dict, List, Tuple
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
from dbx2dab.config_reader import ConfigReader
|
from dbx2dab.config_reader import ConfigReader
|
||||||
from dbx2dab.compare import walk
|
from dbx2dab.compare import tuple_walk
|
||||||
|
|
||||||
|
|
||||||
class VerboseSafeDumper(yaml.SafeDumper):
|
class VerboseSafeDumper(yaml.SafeDumper):
|
||||||
|
@ -138,7 +138,7 @@ class Loader:
|
||||||
correctly_replaced = False
|
correctly_replaced = False
|
||||||
return
|
return
|
||||||
|
|
||||||
walk(complete_config, config, update_callback=update_callback)
|
tuple_walk(complete_config, config, update_callback=update_callback)
|
||||||
|
|
||||||
# If we found an incompatible replacement, bail.
|
# If we found an incompatible replacement, bail.
|
||||||
if not correctly_replaced:
|
if not correctly_replaced:
|
||||||
|
|
Loading…
Reference in New Issue