Skip to content

Instantly share code, notes, and snippets.

@alexd2580
Last active June 13, 2021 13:43
Show Gist options
  • Save alexd2580/760ed66cc3c197d64c784e5b3e740ff8 to your computer and use it in GitHub Desktop.
Save alexd2580/760ed66cc3c197d64c784e5b3e740ff8 to your computer and use it in GitHub Desktop.
Python flake8/isort/black/mypy pre-commit config
repos:
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.4
hooks:
- id: flake8
exclude: migrations|snippets
additional_dependencies: [flake8-isort, flake8-black]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.800
hooks:
- id: mypy
additional_dependencies: [sqlalchemy-stubs, "boto3-stubs[s3,ses,sqs]"]
[sascha:~/code/project/backend] develop ± poetry add pre-commit
Using version ^2.13.0 for pre-commit
Updating dependencies
Resolving dependencies... (3.2s)
Writing lock file
Package operations: 7 installs, 0 updates, 0 removals
• Installing distlib (0.3.2)
• Installing filelock (3.0.12)
• Installing cfgv (3.3.0)
• Installing identify (2.2.10)
• Installing nodeenv (1.6.0)
• Installing virtualenv (20.4.7)
• Installing pre-commit (2.13.0)
[sascha:~/code/project/backend] develop(+148/-3) 5s ± poetry run pre-commit install
pre-commit installed at .git/hooks/pre-commit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment