Skip to content

Commit d719840

Browse files
pylint pre-commit (#48759)
* pylint pre-commit integration * Requested Changes * missing syntax * pylint passed * CI Passed * Cont * fixup Co-authored-by: Marco Edward Gorelli <[email protected]> Co-authored-by: MarcoGorelli <>
1 parent c68d053 commit d719840

File tree

4 files changed

+43
-2
lines changed

4 files changed

+43
-2
lines changed

.pre-commit-config.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ repos:
5959
- flake8==5.0.4
6060
- flake8-bugbear==22.7.1
6161
- pandas-dev-flaker==0.5.0
62+
- repo: https://github.com/pycqa/pylint
63+
rev: v2.15.3
64+
hooks:
65+
- id: pylint
6266
- repo: https://github.com/PyCQA/isort
6367
rev: 5.10.1
6468
hooks:

pandas/tests/frame/methods/test_rename.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ def test_rename_axis_style_raises(self):
336336

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

341341
def test_rename_positional_raises(self):
342342
# GH 29136

pandas/tests/io/test_html.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1140,7 +1140,9 @@ def test_works_on_valid_markup(self, datapath):
11401140
@pytest.mark.slow
11411141
def test_fallback_success(self, datapath):
11421142
banklist_data = datapath("io", "data", "html", "banklist.html")
1143-
self.read_html(banklist_data, match=".*Water.*", flavor=["lxml", "html5lib"])
1143+
self.read_html(
1144+
banklist_data, match=".*Water.*", flavor=["lxml", "html5lib"]
1145+
) # pylint: disable=redundant-keyword-arg
11441146

11451147
def test_to_html_timestamp(self):
11461148
rng = date_range("2000-01-01", periods=10)

pyproject.toml

+35
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,41 @@ exclude = '''
3131
)
3232
'''
3333

34+
[tool.pylint.messages_control]
35+
max-line-length = 88
36+
disable = [
37+
"C",
38+
"R",
39+
"W",
40+
"abstract-class-instantiated",
41+
"access-member-before-definition",
42+
"bad-super-call",
43+
"c-extension-no-member",
44+
"function-redefined",
45+
"import-error",
46+
"inherit-non-class",
47+
"invalid-repr-returned",
48+
"invalid-unary-operand-type",
49+
"misplaced-bare-raise",
50+
"no-member",
51+
"no-method-argument",
52+
"no-name-in-module",
53+
"no-self-argument",
54+
"no-value-for-parameter",
55+
"non-iterator-returned",
56+
"not-an-iterable",
57+
"not-callable",
58+
"redundant-keyword-arg",
59+
"too-many-function-args",
60+
"undefined-variable",
61+
"unexpected-keyword-arg",
62+
"unpacking-non-sequence",
63+
"unsubscriptable-object",
64+
"unsupported-assignment-operation",
65+
"unsupported-membership-test",
66+
"used-before-assignment",
67+
]
68+
3469
[tool.pytest.ini_options]
3570
# sync minversion with pyproject.toml & install.rst
3671
minversion = "6.0"

0 commit comments

Comments
 (0)