forked from Advanced_Python/advanced-python-homework-2023
fix get_doc
This commit is contained in:
parent
593ad6b45c
commit
2ed1f00421
@ -41,7 +41,10 @@ class TurtleDevice(SynchronyDevice):
|
|||||||
descriptors = dict(actions=dict(), traits=dict())
|
descriptors = dict(actions=dict(), traits=dict())
|
||||||
for k, v in self.turtle.__dict__.items():
|
for k, v in self.turtle.__dict__.items():
|
||||||
if not k.startswith("_"):
|
if not k.startswith("_"):
|
||||||
descriptors["traits"][k] = v
|
descriptors["traits"][k] = TraitDescriptor(k,
|
||||||
|
inspect.getdoc(v),
|
||||||
|
readable=True,
|
||||||
|
writable=False)
|
||||||
|
|
||||||
for m_name, member in inspect.getmembers(Turtle):
|
for m_name, member in inspect.getmembers(Turtle):
|
||||||
if m_name.startswith("_"): continue
|
if m_name.startswith("_"): continue
|
||||||
|
Loading…
Reference in New Issue
Block a user