Skip to content

Commit b05b731

Browse files
committed
Enable R level Pylint warnings
1 parent c8dce92 commit b05b731

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

.github/workflows/run_checks_build_and_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- name: run Pylint for errors and warnings only
3030
continue-on-error: true
3131
run: |
32-
pylint --disable=R,C test_shapefile.py src/shapefile.py
32+
pylint --disable=C test_shapefile.py src/shapefile.py
3333
3434
build_wheel_and_sdist:
3535
runs-on: ubuntu-latest

pyproject.toml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ load-plugins=[
112112
"pylint_per_file_ignores",
113113
]
114114

115-
[tool.pylint.'MESSAGES CONTROL']
116115
# Silence warning: shapefile.py:2076:20: W0212: Access to a protected
117116
# member _from_geojson of a client class (protected-access)
118117
# Silence remarks:
@@ -124,20 +123,16 @@ load-plugins=[
124123
# src\shapefile.py:471:4: R0917: Too many positional arguments (6/5) (too-many-positional-arguments)
125124
# src\shapefile.py:506:4: R0911: Too many return statements (10/6) (too-many-return-statements)
126125
# src\shapefile.py:878:0: R0903: Too few public methods (0/2) (too-few-public-methods)
126+
# src\shapefile.py:1981:0: R0904: Too many public methods (23/20) (too-many-public-methods)
127+
# src\shapefile.py:2117:17: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
127128
# Silence warnings: test_shapefile.py:{783,786,799,803,06,1195}:19:
128129
# W0212: Access to a protected member _offsets of a
129130
# client class (protected-access)
130131
#
131132
# Toml multi-line string used instead of array due to:
132133
# https://github.com/christopherpickering/pylint-per-file-ignores/issues/160
134+
[tool.pylint.'messages control']
133135
per-file-ignores = [
134-
"src/shapefile.py:W0212",
135-
"src/shapefile.py:R0902",
136-
"src/shapefile.py:R0903",
137-
"src/shapefile.py:R0911",
138-
"src/shapefile.py:R0912",
139-
"src/shapefile.py:R0914",
140-
"src/shapefile.py:R0915",
141-
"src/shapefile.py:R0917",
142-
"test_shapefile.py:W0212",
136+
"/src/shapefile.py:W0212,R0902,R0903,R0904,R0911,R0912,R0913,R0914,R0915,R0917,R1732",
137+
"test_shapefile.py:W0212,R1732",
143138
]

0 commit comments

Comments
 (0)