Skip to content

Commit e2733e2

Browse files
committed
chore: update pylint and flake8 configs
1 parent 9338567 commit e2733e2

File tree

4 files changed

+13
-5
lines changed

4 files changed

+13
-5
lines changed

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ log_level=DEBUG
3232

3333
# Flake8 Configuration
3434
[flake8]
35-
max_complexity = 10
35+
max_complexity = 11
3636
max_line_length = 120
3737
import_order_style = google
3838
application_import_names = dynamodb_encryption_sdk

src/pylintrc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@
33
disable =
44
bad-continuation, # we let black handle this
55
ungrouped-imports, # we let isort handle this
6-
useless-object-inheritance, # we need to support Python 2, so no, not useless
76
duplicate-code, # causes lots of problems with implementations of common interfaces
7+
# All below are disabled because we need to support Python 2
8+
useless-object-inheritance,
9+
raise-missing-from,
10+
super-with-arguments,
811

912
[BASIC]
1013
# Allow function names up to 50 characters

test/pylintrc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,14 @@ disable =
66
bad-continuation, # we let black handle this
77
ungrouped-imports, # we let isort handle this
88
no-member, # raised on patched objects with mock checks
9-
useless-object-inheritance, # we need to support Python 2, so no, not useless
109
duplicate-code, # unit tests for similar things tend to be similar
1110
protected-access, # raised when calling _ methods
1211
redefined-outer-name, # raised when using pytest-mock
1312
unused-argument, # raised when patches and fixtures are needed but not called
13+
# All below are disabled because we need to support Python 2
14+
useless-object-inheritance,
15+
raise-missing-from,
16+
super-with-arguments,
1417

1518
[DESIGN]
1619
max-args = 10

tox.ini

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,10 @@ deps = {[testenv:flake8]deps}
217217
commands =
218218
flake8 \
219219
# Ignore F811 redefinition errors in tests (breaks with pytest-mock use)
220-
# Ignore D103 docstring requirements for tests
221-
--ignore F811,D103 \
220+
# Ignore D101-107 docstring requirements for tests
221+
# E203 is not PEP8 compliant https://github.com/ambv/black#slices
222+
# W503 is not PEP8 compliant https://github.com/ambv/black#line-breaks--binary-operators
223+
--ignore F811,D101,D102,D103,D107,E203,W503 \
222224
test/
223225

224226
[testenv:flake8-examples]

0 commit comments

Comments
 (0)