add decorator for cli context

This commit is contained in:
2026-09-24 19:06:28 +02:00
parent b4e1fa4ec3
commit d4c78cc29d
11 changed files with 285 additions and 25 deletions
+10
View File
@@ -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"]