[Docs] Replace black/flake8 with pre-commit
This commit is contained in:
parent
0d72195281
commit
d064ad06c5
|
@ -51,18 +51,19 @@ time. They are both run with [pre-commit].
|
||||||
|
|
||||||
We follow [PEP8](http://www.python.org/dev/peps/pep-0008/) and
|
We follow [PEP8](http://www.python.org/dev/peps/pep-0008/) and
|
||||||
[Python Code Style](http://docs.python-guide.org/en/latest/writing/style/)
|
[Python Code Style](http://docs.python-guide.org/en/latest/writing/style/)
|
||||||
which is adhered to with [Black].
|
which is adhered to with [ruff].
|
||||||
|
|
||||||
- Code '''must''' pass [Black], [flake8] and [isort] source code checkers.
|
- Code **must** pass [ruff] linting and formatting with [pre-commit]:
|
||||||
(Optionally [Pylint])
|
|
||||||
|
|
||||||
flake8 deluge
|
pre-commit run --all-files
|
||||||
isort -rc -df deluge
|
|
||||||
pylint deluge
|
|
||||||
pylint deluge/plugins/\*/deluge/
|
|
||||||
|
|
||||||
- Using the [pre-commit] application can aid in identifying issues while
|
- Optionally [Pylint]:
|
||||||
creating git commits.
|
|
||||||
|
pylint deluge
|
||||||
|
pylint deluge/plugins/\*/deluge/
|
||||||
|
|
||||||
|
- Installing the [pre-commit] application can aid in identifying issues
|
||||||
|
while creating git commits.
|
||||||
|
|
||||||
#### Strings and bytes
|
#### Strings and bytes
|
||||||
|
|
||||||
|
@ -116,9 +117,7 @@ Verify that the documentation parses correctly with:
|
||||||
python setup.py build_docs
|
python setup.py build_docs
|
||||||
|
|
||||||
[pre-commit]: http://pre-commit.com/
|
[pre-commit]: http://pre-commit.com/
|
||||||
[flake8]: https://pypi.python.org/pypi/flake8
|
[ruff]: https://docs.astral.sh/ruff/
|
||||||
[isort]: https://pypi.python.org/pypi/isort
|
|
||||||
[pylint]: http://www.pylint.org/
|
[pylint]: http://www.pylint.org/
|
||||||
[black]: https://github.com/python/black/
|
|
||||||
[gtk3 unicode]: http://python-gtk-3-tutorial.readthedocs.org/en/latest/unicode.html
|
[gtk3 unicode]: http://python-gtk-3-tutorial.readthedocs.org/en/latest/unicode.html
|
||||||
[napoleon sections]: http://www.sphinx-doc.org/en/master/usage/extensions/napoleon.html#docstring-sections
|
[napoleon sections]: http://www.sphinx-doc.org/en/master/usage/extensions/napoleon.html#docstring-sections
|
||||||
|
|
|
@ -4,11 +4,4 @@
|
||||||
sphinx-autobuild
|
sphinx-autobuild
|
||||||
tox
|
tox
|
||||||
pre-commit
|
pre-commit
|
||||||
flake8-blind-except
|
|
||||||
flake8-builtins
|
|
||||||
flake8-commas
|
|
||||||
flake8-comprehensions
|
|
||||||
flake8-debugger
|
|
||||||
flake8-mock
|
|
||||||
flake8-mutable
|
|
||||||
rjsmin
|
rjsmin
|
||||||
|
|
|
@ -4,10 +4,5 @@ pytest-twisted
|
||||||
pytest-cov
|
pytest-cov
|
||||||
mock
|
mock
|
||||||
pre-commit
|
pre-commit
|
||||||
flake8<=3.7.9
|
|
||||||
flake8-quotes
|
|
||||||
flake8-isort
|
|
||||||
pep8-naming
|
|
||||||
mccabe
|
|
||||||
pylint
|
pylint
|
||||||
asyncmock; python_version <= '3.7'
|
asyncmock; python_version <= '3.7'
|
||||||
|
|
Loading…
Reference in New Issue