Inspectopedia
 
2024.3

Method is not declared static

Info
New
Last modified: 03 December 2024

Reports any methods that do not require a class instance creation and can be made static.

Example:

If a Make function from method quick-fix is applied, the code changes to:

If you select the Make method static quick-fix, the @staticmethod decorator is added: