You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importgriffedefprint_parameters(path):
""" Print class/method and a list of its parameters """obj=griffe.load(path)
params=", ".join(p.nameforpinobj.parametersifp.name!="self")
print(f"{obj.name}({params})")
print_parameters("sample.PointA")
print_parameters("sample.PointB")
print_parameters("sample.PointC")
print_parameters("sample.PointD")
Output
PointA(x, y)
PointB(x, y)
PointC(x, y, distance)
PointD(x, y, distance)
Expected behavior
The parameters in all four cases should be (x, y).
The text was updated successfully, but these errors were encountered:
Description of the bug
A
@property
or@cached_property
of dataclass is taken to be a class parameterTo Reproduce
sample.py
Demo code
Output
Expected behavior
The parameters in all four cases should be
(x, y)
.The text was updated successfully, but these errors were encountered: