Using the name of a builtin as a property (like "property") breaks the generated code
martijnarts opened this issue · 1 comments
martijnarts commented
It generates this:
@property
def property(self):
# type: () -> str
"""Bar foo"""
return self._property
@property
def second_thing(self):
# type: () -> str
"""Foo bar"""
return self._second_thing
Which breaks on line 7, when it tries to use the earlier method called property
as a decorator.
It should probably import __builtin__
at the start and use @__builtin__.property
instead. The same would be true for other builtins.