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
What we can do meanwhile would be to create a new error message (say A003) explaining the situation, only if the function definition has a decorator. Would that be an optimal solution? I would rather not like to parse the file manually and search for the correct spot going line by line just for this corner case... I'm open to pull requests that do that though
personally given how verbose the error message was I didn't find it too difficult to identify the source of the problem even with the decorator being mistakenly reported.
we're tossing up whether or not to noqa this error, and when we do so we usually prefer to noqa a specific error code.
If I understand your suggestion correctly a user would have to noqa different error codes if they add/remove a decorator, which perhaps is enough reason (combined with the already descriptive error message) to not bother splitting it out
See #22 (comment) for the details.
So far it seems that the
ast
module does not provide that information.An upstream bug to CPython has been created for that: https://bugs.python.org/issue33211
/cc @dhood
The text was updated successfully, but these errors were encountered: