-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Labels
Pythonfalse-positivenot securityThis issue does not relate to a security queryThis issue does not relate to a security query
Description
Maybe a bit of an edge case, but this code gives warning of unnessary assignments:
t = "<<Unknown>>"
with suppress(AttributeError):
# Set to type arg.
t = cls = get_args(self.__orig_class__)[0]
# If a class, set to the qualname.
t = cls.__qualname__
It should probably recognise that any code in a suppress() block may not actually run to completion.
Metadata
Metadata
Assignees
Labels
Pythonfalse-positivenot securityThis issue does not relate to a security queryThis issue does not relate to a security query