integreat-cms icon indicating copy to clipboard operation
integreat-cms copied to clipboard

Pylint directives are applied wrong

Open david-venhoff opened this issue 4 months ago • 0 comments

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

david-venhoff avatar Oct 21 '24 15:10 david-venhoff