Skip to content

Commit

Permalink
Upgrade pylint & split config files
Browse files Browse the repository at this point in the history
  • Loading branch information
jtraglia committed Oct 21, 2024
1 parent dba1179 commit 6de2e29
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 24 deletions.
9 changes: 4 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions flake8.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[flake8]
ignore = E252,W504,W503
max-line-length = 120
18 changes: 0 additions & 18 deletions linter.ini

This file was deleted.

7 changes: 7 additions & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions pylint.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[MESSAGES CONTROL]
disable = all
enable = unused-argument
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
},
Expand Down

0 comments on commit 6de2e29

Please sign in to comment.