PyCharm provides some helpful warnings on code style, conventions and logical gotchas. It also provides a notification if I try to commit code with warnings (or errors).
Sometimes I consciously ignore these warnings for particular lines of code (for various reasons, typically to account for implementation details of third-party libraries). I want to suppress the warning, but just for that line (if the warning crops up on a different line where I'm not being deliberate, I want to know about it!)
How can I do that in PyCharm? (Following a universal Python convention strongly preferable.)
@SuppressWarnings
annotation, to indicate 'yeah, this line of code looks bad, but it's okay, I promise'. https://mcmap.net/q/53473/-how-to-disable-python-warnings ← This answer looked hopeful, but I still couldn't get the 'Too broad exception clause' warnings to go away when I'm logging the exceptions. – Ednapylint
suppression. As long as all of you usepylint
you should get what you expect. – Trumpetweedpylint
to ignore particular warnings for particular lines of code, within the code? – Ednapylint
explicitly. This is all depicted in the answer to the question about both. – Trumpetweed