Skip to content

Instantly share code, notes, and snippets.

@c0m4r
Last active January 11, 2024 11:35
Show Gist options
  • Save c0m4r/ab8f083ceb6ba0c9bf5d36dd58518dc3 to your computer and use it in GitHub Desktop.
Save c0m4r/ab8f083ceb6ba0c9bf5d36dd58518dc3 to your computer and use it in GitHub Desktop.
Python linters, formatters, best practices

Python linters, formatters, best practices

name installation skipping optional
bandit pip install bandit -S
codespell pip install codespell
mypy pip install mypy --disable-error-code --strict
pylama pip install pylama -i --ignore
pylint pip install pylint --disable
pyright pip install pyright
ruff pip install ruff --ignore

Formatters

name installation skipping diff
black pip install black --check --diff --color

See also

Helper script

See: https://github.com/c0m4r/okrutnik

Final thoughts

  • flake8 has been removed from the list as it complains about valid stuff

If you found this article helpful, please consider making donation to a charity on my behalf. Thank you.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment