Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Prev Previous commit
Next Next commit
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jun 8, 2024
commit a1be8a4c9c2ecb5ee80e379a2daa3e3710250584
6 changes: 2 additions & 4 deletions mypy/semanal.py
Original file line number Diff line number Diff line change
Expand Up @@ -903,7 +903,7 @@ def analyze_func_def(self, defn: FuncDef) -> None:
self.prepare_method_signature(defn, self.type, has_self_type)

# Analyze function signature
fullname =self.function_fullname(defn.fullname)
fullname = self.function_fullname(defn.fullname)
with self.tvar_scope_frame(self.tvar_scope.method_frame(fullname)):
if defn.type:
self.check_classvar_in_signature(defn.type)
Expand All @@ -912,9 +912,7 @@ def analyze_func_def(self, defn: FuncDef) -> None:
# class-level imported names and type variables are in scope.
analyzer = self.type_analyzer()
tag = self.track_incomplete_refs()
result = analyzer.visit_callable_type(
defn.type, nested=False, namespace=fullname
)
result = analyzer.visit_callable_type(defn.type, nested=False, namespace=fullname)
# Don't store not ready types (including placeholders).
if self.found_incomplete_ref(tag) or has_placeholder(result):
self.defer(defn)
Expand Down