Skip to content

Commit 8bd4bf8

Browse files
authored
pre-commit integration (#320)
* added .pre-commit-config.yaml + isort/black/flake8 conf * format: trailing whitespaces * format: end of files * format: pyupgrade * format: autoflake * format: isort * format: black * format: flake8 * bumped version to 1.3.6 * removed unnecessary test dep
1 parent 2fddb20 commit 8bd4bf8

29 files changed

+1845
-1462
lines changed

.pre-commit-config.yaml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
exclude: 'docs|migrations'
2+
3+
repos:
4+
- repo: https://github.com/pre-commit/pre-commit-hooks
5+
rev: v4.1.0
6+
hooks:
7+
- id: trailing-whitespace
8+
- id: end-of-file-fixer
9+
- id: check-yaml
10+
- id: check-toml
11+
- id: check-case-conflict
12+
- id: check-merge-conflict
13+
- id: debug-statements
14+
15+
- repo: https://github.com/asottile/pyupgrade
16+
rev: v2.31.0
17+
hooks:
18+
- id: pyupgrade
19+
args: [--py36-plus]
20+
21+
- repo: https://github.com/myint/autoflake
22+
rev: 'v1.4'
23+
hooks:
24+
- id: autoflake
25+
args: ['--in-place', '--remove-all-unused-imports', '--ignore-init-module-imports']
26+
27+
- repo: https://github.com/pycqa/isort
28+
rev: 5.10.1
29+
hooks:
30+
- id: isort
31+
name: isort (python)
32+
args: ['--settings-path=pyproject.toml']
33+
34+
- repo: https://github.com/psf/black
35+
rev: 21.12b0
36+
hooks:
37+
- id: black
38+
39+
- repo: https://github.com/adamchainz/django-upgrade
40+
rev: 1.3.2
41+
hooks:
42+
- id: django-upgrade
43+
args: [--target-version, "2.2"]
44+
45+
- repo: https://github.com/pycqa/flake8
46+
rev: 4.0.1
47+
hooks:
48+
- id: flake8
49+
args: ['--config=setup.cfg']
50+
additional_dependencies: [flake8-bugbear, flake8-isort]
51+
verbose: true

djangosaml2/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
default_app_config = 'djangosaml2.apps.DjangoSaml2Config'
1+
default_app_config = "djangosaml2.apps.DjangoSaml2Config"

djangosaml2/apps.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33

44
class DjangoSaml2Config(AppConfig):
5-
name = 'djangosaml2'
5+
name = "djangosaml2"
66
verbose_name = "DjangoSAML2"
77

88
def ready(self):

0 commit comments

Comments
 (0)