Replace flake8 with ruff for Python linting

This commit is contained in:
Wilson Snyder 2023-05-06 06:08:32 -04:00
parent 1a1c5c5d44
commit 76f5de6e54
2 changed files with 5 additions and 7 deletions

View File

@ -424,17 +424,15 @@ YAPF_FLAGS = -i
yapf:
$(YAPF) $(YAPF_FLAGS) $(PY_FILES)
FLAKE8 = flake8
FLAKE8_FLAGS = \
--extend-exclude=fastcov.py \
--ignore=E123,E129,E251,E402,E501,W503,W504,E701
PYLINT = pylint
PYLINT_FLAGS = --score=n --disable=R0801
RUFF = ruff
RUFF_FLAGS = check --ignore=E402,E501,E701
lint-py:
-$(FLAKE8) $(FLAKE8_FLAGS) $(PY_PROGRAMS)
-$(PYLINT) $(PYLINT_FLAGS) $(PY_PROGRAMS)
-$(RUFF) $(RUFF_FLAGS) $(PY_PROGRAMS)
format-pl-exec:
-chmod a+x test_regress/t/*.pl

View File

@ -126,7 +126,7 @@ Those developing Verilator itself may also want these (see internals.rst):
sudo apt-get install gdb graphviz cmake clang clang-format-14 gprof lcov
sudo apt-get install libclang-dev yapf3
sudo pip3 install clang sphinx sphinx_rtd_theme sphinxcontrib-spelling breathe
sudo pip3 install clang sphinx sphinx_rtd_theme sphinxcontrib-spelling breathe ruff
cpan install Pod::Perldoc
cpan install Parallel::Forker