We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 28849f0 commit 0e24909Copy full SHA for 0e24909
mypy/semanal.py
@@ -3650,7 +3650,7 @@ def unwrap_final(self, s: AssignmentStmt) -> bool:
3650
isinstance(s.rvalue, TempNode)
3651
and s.rvalue.no_rhs
3652
# Filter duplicate errors, we already reported this:
3653
- and not self.type.is_named_tuple
+ and not (self.type and self.type.is_named_tuple)
3654
):
3655
invalid_bare_final = True
3656
self.fail("Type in Final[...] can only be omitted if there is an initializer", s)
0 commit comments