diff --git a/Makefile b/Makefile index 39d493645e..657a746586 100644 --- a/Makefile +++ b/Makefile @@ -41,7 +41,6 @@ COV_HTML_OUT_DIR=$(PY_SPEC_DIR)/$(COV_HTML_OUT) COV_INDEX_FILE=$(COV_HTML_OUT_DIR)/index.html CURRENT_DIR = ${CURDIR} -LINTER_CONFIG_FILE = $(CURRENT_DIR)/linter.ini GENERATOR_ERROR_LOG_FILE = $(CURRENT_DIR)/$(TEST_VECTOR_DIR)/testgen_error_log.txt SCRIPTS_DIR = ${CURRENT_DIR}/scripts @@ -151,13 +150,13 @@ codespell: lint: pyspec . venv/bin/activate; cd $(PY_SPEC_DIR); \ - flake8 --config $(LINTER_CONFIG_FILE) ./eth2spec \ - && python -m pylint --rcfile $(LINTER_CONFIG_FILE) $(PYLINT_SCOPE) \ - && python -m mypy --config-file $(LINTER_CONFIG_FILE) $(MYPY_SCOPE) + flake8 --config $(CURRENT_DIR)/flake8.ini ./eth2spec \ + && python -m pylint --rcfile $(CURRENT_DIR)/pylint.ini $(PYLINT_SCOPE) \ + && python -m mypy --config-file $(CURRENT_DIR)/mypy.ini $(MYPY_SCOPE) lint_generators: pyspec . venv/bin/activate; cd $(TEST_GENERATORS_DIR); \ - flake8 --config $(LINTER_CONFIG_FILE) + flake8 --config $(CURRENT_DIR)/flake8.ini # Runs a generator, identified by param 1 define run_generator diff --git a/flake8.ini b/flake8.ini new file mode 100644 index 0000000000..f94b2ad47a --- /dev/null +++ b/flake8.ini @@ -0,0 +1,3 @@ +[flake8] +ignore = E252,W504,W503 +max-line-length = 120 \ No newline at end of file diff --git a/linter.ini b/linter.ini deleted file mode 100644 index 52a3aec0e0..0000000000 --- a/linter.ini +++ /dev/null @@ -1,18 +0,0 @@ -[flake8] -ignore = E252,W504,W503 -max-line-length = 120 - -[mypy] -disallow_incomplete_defs = True -disallow_untyped_defs = True - -warn_unused_ignores = True -warn_unused_configs = True -warn_redundant_casts = True - -ignore_missing_imports = True - -# pylint -[MESSAGES CONTROL] -disable = all -enable = unused-argument diff --git a/mypy.ini b/mypy.ini new file mode 100644 index 0000000000..6f16a21c7a --- /dev/null +++ b/mypy.ini @@ -0,0 +1,7 @@ +[mypy] +disallow_incomplete_defs = True +disallow_untyped_defs = True +warn_unused_ignores = True +warn_unused_configs = True +warn_redundant_casts = True +ignore_missing_imports = True \ No newline at end of file diff --git a/pylint.ini b/pylint.ini new file mode 100644 index 0000000000..a8242683a3 --- /dev/null +++ b/pylint.ini @@ -0,0 +1,3 @@ +[MESSAGES CONTROL] +disable = all +enable = unused-argument \ No newline at end of file diff --git a/setup.py b/setup.py index 8d5aa213b7..83ae7accb4 100644 --- a/setup.py +++ b/setup.py @@ -561,7 +561,7 @@ def run(self): python_requires=">=3.9, <4", extras_require={ "test": ["pytest>=4.4", "pytest-cov", "pytest-xdist"], - "lint": ["flake8==5.0.4", "mypy==0.981", "pylint==2.15.3"], + "lint": ["flake8==5.0.4", "mypy==0.981", "pylint==3.3.1"], "generator": ["setuptools>=72.0.0", "pytest>4.4", "python-snappy==0.7.3", "filelock", "pathos==0.3.0"], "docs": ["mkdocs==1.4.2", "mkdocs-material==9.1.5", "mdx-truly-sane-lists==1.3", "mkdocs-awesome-pages-plugin==2.8.0"] },