Skip to content

pylint pre-commit #48759

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

Merged
merged 9 commits into from
Sep 29, 2022
Merged
Show file tree
Hide file tree
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: 4 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ repos:
- flake8==5.0.4
- flake8-bugbear==22.7.1
- pandas-dev-flaker==0.5.0
- repo: https://github.com/pycqa/pylint
rev: v2.15.3
hooks:
- id: pylint
- repo: https://github.com/PyCQA/isort
rev: 5.10.1
hooks:
Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/frame/methods/test_rename.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ def test_rename_axis_style_raises(self):

# Duplicates
with pytest.raises(TypeError, match="multiple values"):
df.rename(id, mapper=id)
df.rename(id, mapper=id) # pylint: disable=redundant-keyword-arg

def test_rename_positional_raises(self):
# GH 29136
Expand Down
4 changes: 3 additions & 1 deletion pandas/tests/io/test_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -1140,7 +1140,9 @@ def test_works_on_valid_markup(self, datapath):
@pytest.mark.slow
def test_fallback_success(self, datapath):
banklist_data = datapath("io", "data", "html", "banklist.html")
self.read_html(banklist_data, match=".*Water.*", flavor=["lxml", "html5lib"])
self.read_html(
banklist_data, match=".*Water.*", flavor=["lxml", "html5lib"]
) # pylint: disable=redundant-keyword-arg

def test_to_html_timestamp(self):
rng = date_range("2000-01-01", periods=10)
Expand Down
35 changes: 35 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,41 @@ exclude = '''
)
'''

[tool.pylint.messages_control]
max-line-length = 88
disable = [
"C",
"R",
"W",
"abstract-class-instantiated",
"access-member-before-definition",
"bad-super-call",
"c-extension-no-member",
"function-redefined",
"import-error",
"inherit-non-class",
"invalid-repr-returned",
"invalid-unary-operand-type",
"misplaced-bare-raise",
"no-member",
"no-method-argument",
"no-name-in-module",
"no-self-argument",
"no-value-for-parameter",
"non-iterator-returned",
"not-an-iterable",
"not-callable",
"redundant-keyword-arg",
"too-many-function-args",
"undefined-variable",
"unexpected-keyword-arg",
"unpacking-non-sequence",
"unsubscriptable-object",
"unsupported-assignment-operation",
"unsupported-membership-test",
"used-before-assignment",
]

[tool.pytest.ini_options]
# sync minversion with pyproject.toml & install.rst
minversion = "6.0"
Expand Down