You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using a more explicit statement if TYPE_CHECKING is True:, the plugin reports TC002 which is incorrect.
The type checking explicit value to True is a good secure coding practice, specially with a dynamically typed language such as Python.
The text was updated successfully, but these errors were encountered:
Thanks for reporting this @iamibi, I definitely understand your motivation. To be honest, I don't think adding the is True adds any value here, but I would be happy to accept contribution which amends the code to add this pattern.
Just so you know, every pattern like this has to be mapped more or less explicitly, so there will always be a need to draw a line in the sand somewhere, in terms of how complex the plugin should be. It isn't a bug, we just haven't added this extra handling yet 👍
Thanks for reporting this @iamibi, I definitely understand your motivation. To be honest, I don't think adding the is True adds any value here, but I would be happy to accept contribution which amends the code to add this pattern.
Just so you know, every pattern like this has to be mapped more or less explicitly, so there will always be a need to draw a line in the sand somewhere, in terms of how complex the plugin should be. It isn't a bug, we just haven't added this extra handling yet 👍
Makes sense. Will try to add contributions @sondrelg
When using a more explicit statement
if TYPE_CHECKING is True:
, the plugin reportsTC002
which is incorrect.The type checking explicit value to True is a good secure coding practice, specially with a dynamically typed language such as Python.
The text was updated successfully, but these errors were encountered: