Skip to content

Commit

Permalink
pre-commit integration (#320)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
g-as authored Jan 13, 2022
1 parent 2fddb20 commit 8bd4bf8
Show file tree
Hide file tree
Showing 29 changed files with 1,845 additions and 1,462 deletions.
51 changes: 51 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
exclude: 'docs|migrations'

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-toml
- id: check-case-conflict
- id: check-merge-conflict
- id: debug-statements

- repo: https://github.com/asottile/pyupgrade
rev: v2.31.0
hooks:
- id: pyupgrade
args: [--py36-plus]

- repo: https://github.com/myint/autoflake
rev: 'v1.4'
hooks:
- id: autoflake
args: ['--in-place', '--remove-all-unused-imports', '--ignore-init-module-imports']

- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort
name: isort (python)
args: ['--settings-path=pyproject.toml']

- repo: https://github.com/psf/black
rev: 21.12b0
hooks:
- id: black

- repo: https://github.com/adamchainz/django-upgrade
rev: 1.3.2
hooks:
- id: django-upgrade
args: [--target-version, "2.2"]

- repo: https://github.com/pycqa/flake8
rev: 4.0.1
hooks:
- id: flake8
args: ['--config=setup.cfg']
additional_dependencies: [flake8-bugbear, flake8-isort]
verbose: true
2 changes: 1 addition & 1 deletion djangosaml2/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
default_app_config = 'djangosaml2.apps.DjangoSaml2Config'
default_app_config = "djangosaml2.apps.DjangoSaml2Config"
2 changes: 1 addition & 1 deletion djangosaml2/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


class DjangoSaml2Config(AppConfig):
name = 'djangosaml2'
name = "djangosaml2"
verbose_name = "DjangoSAML2"

def ready(self):
Expand Down
Loading

0 comments on commit 8bd4bf8

Please sign in to comment.