Add pre-commit config

This commit is contained in:
pukkandan 2022-11-13 22:28:29 +05:30
commit 727f4b76da
No known key found for this signature in database
GPG key ID: 7EEE9E1E817D0A39
2 changed files with 27 additions and 1 deletions

13
.pre-commit-config.yaml Normal file
View file

@ -0,0 +1,13 @@
repos:
- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort
- repo: https://github.com/pre-commit/mirrors-autopep8
rev: v2.0.0
hooks:
- id: autopep8
- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
hooks:
- id: flake8

View file

@ -2,5 +2,18 @@
universal = True universal = True
[flake8] [flake8]
exclude = youtube_dl/extractor/__init__.py,devscripts/buildserver.py,devscripts/lazy_load_template.py,devscripts/make_issue_template.py,setup.py,build,.git,venv exclude = build,venv,.tox,.git,.pytest_cache
ignore = E402,E501,E731,E741,W503 ignore = E402,E501,E731,E741,W503
max_line_length = 80
per_file_ignores =
devscripts/lazy_load_template.py: F401
[isort]
py_version = 27
multi_line_output = VERTICAL_HANGING_INDENT
line_length = 80
reverse_relative = true
ensure_newline_before_comments = true
include_trailing_comma = true
known_first_party =
test