mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-02-20 14:28:22 +00:00
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
|
COV_INDEX_FILE=$(COV_HTML_OUT_DIR)/index.html
|
||||||
|
|
||||||
CURRENT_DIR = ${CURDIR}
|
CURRENT_DIR = ${CURDIR}
|
||||||
LINTER_CONFIG_FILE = $(CURRENT_DIR)/linter.ini
|
|
||||||
GENERATOR_ERROR_LOG_FILE = $(CURRENT_DIR)/$(TEST_VECTOR_DIR)/testgen_error_log.txt
|
GENERATOR_ERROR_LOG_FILE = $(CURRENT_DIR)/$(TEST_VECTOR_DIR)/testgen_error_log.txt
|
||||||
|
|
||||||
SCRIPTS_DIR = ${CURRENT_DIR}/scripts
|
SCRIPTS_DIR = ${CURRENT_DIR}/scripts
|
||||||
@ -151,13 +150,13 @@ codespell:
|
|||||||
|
|
||||||
lint: pyspec
|
lint: pyspec
|
||||||
. venv/bin/activate; cd $(PY_SPEC_DIR); \
|
. venv/bin/activate; cd $(PY_SPEC_DIR); \
|
||||||
flake8 --config $(LINTER_CONFIG_FILE) ./eth2spec \
|
flake8 --config $(CURRENT_DIR)/flake8.ini ./eth2spec \
|
||||||
&& python -m pylint --rcfile $(LINTER_CONFIG_FILE) $(PYLINT_SCOPE) \
|
&& python -m pylint --rcfile $(CURRENT_DIR)/pylint.ini $(PYLINT_SCOPE) \
|
||||||
&& python -m mypy --config-file $(LINTER_CONFIG_FILE) $(MYPY_SCOPE)
|
&& python -m mypy --config-file $(CURRENT_DIR)/mypy.ini $(MYPY_SCOPE)
|
||||||
|
|
||||||
lint_generators: pyspec
|
lint_generators: pyspec
|
||||||
. venv/bin/activate; cd $(TEST_GENERATORS_DIR); \
|
. 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
|
# Runs a generator, identified by param 1
|
||||||
define run_generator
|
define run_generator
|
||||||
|
3
flake8.ini
Normal file
3
flake8.ini
Normal file
@ -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
|
|
7
mypy.ini
Normal file
7
mypy.ini
Normal file
@ -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
pylint.ini
Normal file
3
pylint.ini
Normal file
@ -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",
|
python_requires=">=3.9, <4",
|
||||||
extras_require={
|
extras_require={
|
||||||
"test": ["pytest>=4.4", "pytest-cov", "pytest-xdist"],
|
"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"],
|
"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"]
|
"docs": ["mkdocs==1.4.2", "mkdocs-material==9.1.5", "mdx-truly-sane-lists==1.3", "mkdocs-awesome-pages-plugin==2.8.0"]
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user