integreat-cms
integreat-cms copied to clipboard
Pylint directives are applied wrong
Describe the Bug
Looks like we have been applying the pylint # pylint: disable=…
directives wrong :see_no_evil:
It is usually wrong to place a pylint directive directly on top of a function, because this directive will then apply to its enclosing block, and not just the function. The correct way to suppress pylint lints for a function is to make the directive the first line of the function. More information: https://pylint.pycqa.org/en/latest/user_guide/messages/message_control.html#block-disables
Additional Information
Discovered here