Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pylint seems to be disabled more than intended. #398

Open
zapta opened this issue Sep 2, 2024 · 2 comments
Open

Pylint seems to be disabled more than intended. #398

zapta opened this issue Sep 2, 2024 · 2 comments

Comments

@zapta
Copy link
Collaborator

zapta commented Sep 2, 2024

The APIO code include pylint directives that appear to relate to a single error or warning but in fact they disable the linting for adjacent statements as well (until the end of block?), potentially hiding additional errors or warnings.

    # R0913: Too many arguments (6/5)
    # pylint: disable=R0913
    def run(self, command, variables, packages, board=None, arch=None):
      .....
@zapta
Copy link
Collaborator Author

zapta commented Sep 22, 2024

It seems taht pylint provide some control over the scope of the warnings suppression, as described at https://pylint.pycqa.org/en/latest/user_guide/messages/message_control.html

For example, the disable-next directive applies only to the next line.

# pylint: disable-next=dangerous-default-value

@zapta
Copy link
Collaborator Author

zapta commented Oct 13, 2024

One option is to move all the pylint disable directive to the top of their respective files. This will convey their scope.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant