Upgrade pylint & split config files
This commit is contained in:
parent
dba11796a9
commit
6de2e297ea
9
Makefile
9
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
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
[flake8]
|
||||
ignore = E252,W504,W503
|
||||
max-line-length = 120
|
18
linter.ini
18
linter.ini
|
@ -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
|
|
@ -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
|
|
@ -0,0 +1,3 @@
|
|||
[MESSAGES CONTROL]
|
||||
disable = all
|
||||
enable = unused-argument
|
2
setup.py
2
setup.py
|
@ -561,7 +561,7 @@ setup(
|
|||
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"]
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue