add precommit hook

dev
Dmitry Titov 3 years ago
parent 1eab6cf56f
commit ed1832b6f1

@ -2,4 +2,6 @@
.gitlab/*
.gitlab-ci.yml
README.md
.git/*
.git/*
.pre-commit-config.yaml
.flake8

@ -1,4 +1,4 @@
[flake8]
max-line-length = 120
exclude = tests/*
max-complexity = 10
exclude = fixtures/*
max-complexity = 10

@ -0,0 +1,30 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: debug-statements
- id: double-quote-string-fixer
- id: name-tests-test
- id: requirements-txt-fixer
- repo: https://github.com/asottile/setup-cfg-fmt
rev: v2.2.0
hooks:
- id: setup-cfg-fmt
- repo: https://github.com/asottile/reorder_python_imports
rev: v3.9.0
hooks:
- id: reorder-python-imports
exclude: ^(pre_commit/resources/|testing/resources/python3_hooks_repo/)
args: [--py38-plus, --add-import, 'from __future__ import annotations']
- repo: https://github.com/asottile/add-trailing-comma
rev: v2.4.0
hooks:
- id: add-trailing-comma
args: [--py36-plus]
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
- id: flake8

@ -38,6 +38,7 @@ packaging==23.0
pandas==1.4.2
Pillow==9.4.0
plotly==5.13.0
pre-commit
psycopg2-binary==2.9.3
pygeos==0.14
pyparsing==3.0.9
@ -60,4 +61,3 @@ uritemplate==4.1.1
urllib3==1.26.14
xlrd==1.2.0
XlsxWriter==3.0.8

@ -1,8 +1,8 @@
from __future__ import annotations
from django.apps import AppConfig
class ServiceConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'service'
a = "longline that doesn't fit in 79 symbols 79 symbols 79 symbols 79 symbols 79 symbols"

Loading…
Cancel
Save