add decorator for cli context
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import ast
|
||||
|
||||
from dbyaml.decorator import attribute_path
|
||||
|
||||
tree = ast.parse("alpha.beta().gamma").body[0].value # ty: ignore[unresolved-attribute]
|
||||
|
||||
|
||||
def test_attribute_path():
|
||||
path = attribute_path(tree)
|
||||
assert path == ["alpha", "beta()", "gamma"]
|
||||
Reference in New Issue
Block a user