Fix #8534: autoattribute failed to document a commented attribute in alias class

So far, autoattribute uses "given class name" to fetch comments of
uninitialized instance attributes.  But pycode expects to use "real"
class name on searching attribute comments.

This adds UninitializedInstanceAttributeMixin to handle it simply.
This commit is contained in:
Takeshi KOMIYA
2020-12-13 19:49:36 +09:00
parent 3e46fda759
commit caa1d1f3c2
5 changed files with 130 additions and 18 deletions

View File

@@ -29,3 +29,6 @@ class Class:
class Derived(Class):
attr7: int
Alias = Class