Skip to content

Commit 60bb757

Browse files
committed
Detect more decorated properties
1 parent 32abf72 commit 60bb757

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

mypy/semanal.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,8 @@ def analyse_property_with_multi_part_definition(self, defn: OverloadedFuncDef) -
303303
if node.name == 'setter':
304304
# The first item represents the entire property.
305305
defn.items[0].var.is_settable_property = True
306+
else:
307+
self.fail("Decorated property not supported", item)
306308
item.func.accept(self)
307309

308310
def analyse_function(self, defn: FuncItem) -> None:

mypy/test/data/semanal-errors.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1251,7 +1251,7 @@ class A:
12511251
@overload # E: Decorated property not supported
12521252
@property
12531253
def f(self) -> int: pass
1254-
@property
1254+
@property # E: Decorated property not supported
12551255
@overload
12561256
def f(self) -> int: pass
12571257
[builtins fixtures/property.py]

0 commit comments

Comments
 (0)