Method XYZ may be static


my project has a module which was written quite OO like. I'm refactoring this one now, but I get very annoying warnings "Method 'xyz' may be static." It's true, yes, but making the methods static does not make much sense from a programming perspective.

How do you disable this warning, given that did not list an error code that would do this?

Comment actions Permalink
try alt-enter when your cursor is at the warning... there should be a menu with "Make Method static". In the submenu of this point you should be able to surpress the warning for this method, for the whole class or to disable the inspection for the whole project.

you can also open the settings. Look for the inspections settings under project settings. There should be "Method may be static" in the python section.
Comment actions Permalink
This worked. Thanks very much Bastian.


Please sign in to leave a comment.