File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -1265,10 +1265,10 @@ def process_deprecated_overload(self, defn: OverloadedFuncDef) -> None:
12651265 if defn .is_property :
12661266 return
12671267
1268- if isinstance ( impl := defn . impl , Decorator ) and isinstance (
1269- type_ := impl . func . type , CallableType
1270- ) and (
1271- ( deprecated := type_ .deprecated ) is not None
1268+ if (
1269+ isinstance ( impl := defn . impl , Decorator )
1270+ and isinstance ( type_ := impl . func . type , CallableType )
1271+ and (( deprecated := type_ .deprecated ) is not None )
12721272 ):
12731273 if isinstance (defn .type , Overloaded ):
12741274 defn .type .deprecated = deprecated
@@ -1713,9 +1713,7 @@ def visit_decorator(self, dec: Decorator) -> None:
17131713 dec .func .dataclass_transform_spec = self .parse_dataclass_transform_spec (d )
17141714 elif (deprecated := self .get_deprecated (d )) is not None :
17151715 if isinstance (type_ := dec .func .type , CallableType ):
1716- type_ .deprecated = (
1717- f"function { dec .fullname } is deprecated: { deprecated } "
1718- )
1716+ type_ .deprecated = f"function { dec .fullname } is deprecated: { deprecated } "
17191717 elif not dec .var .is_property :
17201718 # We have seen a "non-trivial" decorator before seeing @property, if
17211719 # we will see a @property later, give an error, as we don't support this.
You can’t perform that action at this time.
0 commit comments