add `pylint` to catch unused args

This commit is contained in:
Alex Stokes 2022-01-13 11:20:30 -08:00
parent 50a63c4135
commit fd27d93898
No known key found for this signature in database
GPG Key ID: 99B3D88FD6C55A69
2 changed files with 3 additions and 1 deletions

View File

@ -130,9 +130,11 @@ codespell:
codespell . --skip ./.git -I .codespell-whitelist
# TODO: add future protocol upgrade patch packages to linting.
# NOTE: we use `pylint` just for catching unused arguments in spec code
lint: pyspec
. venv/bin/activate; cd $(PY_SPEC_DIR); \
flake8 --config $(LINTER_CONFIG_FILE) ./eth2spec \
&& pylint --disable=all --enable unused-argument ./eth2spec/phase0 ./eth2spec/altair ./eth2spec/bellatrix \
&& mypy --config-file $(LINTER_CONFIG_FILE) -p eth2spec.phase0 -p eth2spec.altair -p eth2spec.bellatrix
lint_generators: pyspec

View File

@ -1008,7 +1008,7 @@ setup(
python_requires=">=3.8, <4",
extras_require={
"test": ["pytest>=4.4", "pytest-cov", "pytest-xdist"],
"lint": ["flake8==3.7.7", "mypy==0.812"],
"lint": ["flake8==3.7.7", "mypy==0.812", "pylint==2.12.2"],
"generator": ["python-snappy==0.5.4"],
},
install_requires=[