Open StefanBruens opened 2 years ago
Attributes with a single leading underscore are considered private, not type info should be generated (by default).
Also see https://mypy.readthedocs.io/en/stable/stubgen.html#cmdoption-stubgen-include-private
The following fragment in AttributeStubsGenerator.to_lines seems to do the job:
AttributeStubsGenerator.to_lines
def to_lines(self): # type: () -> List[str] if re.match(r"^_[^_](.*[^_])?$", self.name): pass ...
Attributes with a single leading underscore are considered private, not type info should be generated (by default).
Also see https://mypy.readthedocs.io/en/stable/stubgen.html#cmdoption-stubgen-include-private
The following fragment in
AttributeStubsGenerator.to_lines
seems to do the job: