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

PyLintBear: ignore PyLint rules individually #1475

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions bears/python/PyLintBear.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class PyLintBear:

@staticmethod
def create_arguments(filename, file, config_file,
pylint_disable: typed_list(str)=None,
pylint_disable: typed_list(str)='',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line contains following spacing inconsistencies:

  • Trailing whitespaces.

SpaceConsistencyBear, severity NORMAL, section python.

The issue can be fixed by applying the following patch:

--- a/bears/python/PyLintBear.py
+++ b/bears/python/PyLintBear.py
@@ -38,7 +38,7 @@
                          pylint_rcfile: str=''):
         """
         :param pylint_disable:     Disable the message, report, category or
-                                   checker with the given id(s). User will 
+                                   checker with the given id(s). User will
                                    input id.
         :param pylint_enable:      Enable the message, report, category or
                                    checker with the given id(s).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

W291 trailing whitespace'

PycodestyleBear (W291), severity NORMAL, section autopep8.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How this solves the problem?

pylint_enable: typed_list(str)=None,
pylint_cli_options: str='',
pylint_rcfile: str=''):
Expand All @@ -49,8 +49,6 @@ def create_arguments(filename, file, config_file,
'--msg-template="L{line}C{column}: {msg_id} - {msg}"')
if pylint_disable:
args += ('--disable=' + ','.join(pylint_disable),)
if pylint_enable:
args += ('--enable=' + ','.join(pylint_enable),)
if pylint_cli_options:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess you should also change the tests.

args += tuple(shlex.split(pylint_cli_options))
if pylint_rcfile:
Expand Down