How to handle the pylint message: Warning: Method could be a function

Moving it to a function is common, if it doesn't touch the class at all.

If it manipulates class attributes, use the classmethod decorator:

@classmethod
def spam(cls, ...):
   # cls is the class, you can use it to get class attributes

classmethod and staticmethod (which is the same as the former, except that the method doesn't get a reference to the class from its first parameter) have been introduced quite recently. It means that some Python programmers are used to avoid static and class methods.

Some hardcore Python programmers will tell you that these decorators just complicate things; some other people (usually former C# or Java programmers) will tell you that using a function isn't object-oriented enough. I think it's just a matter of preference.