Consider a Python class with a number of @staticmethod methods and few instance methods. The static methods don't accept an instance of the defining class as parameters.Do you think that all these static methods don't belong to the class and should be factored out?If yes, which approach would you take to clean up such code?
Is @staticmethod proliferation a code smell?
python;code quality;code smell;static methods
Sounds like a module masquerading as a class (which is common to see in a language like Java where there are no methods outside of classes, so the only way to make something that looks like a module is to make a static only class).  If the static methods are doing something that's actually related to the class as a whole, such as managing a pool of them, generating them (factories) or something along those lines then yes, they might be legitimate static methods.  Otherwise, they probably should just be module level methods.