-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from bernhard-hagmann/precommit_ruff
SIANXKE-395: Update pre-commit configuration and re-format all files
- Loading branch information
Showing
11 changed files
with
48 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,27 @@ | ||
repos: | ||
- repo: https://github.com/pycqa/isort | ||
rev: 5.12.0 | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v5.0.0 | ||
hooks: | ||
- id: isort | ||
args: [ "--profile", "black", "--filter-files" ] | ||
- id: check-merge-conflict | ||
- id: end-of-file-fixer | ||
- id: requirements-txt-fixer | ||
- id: trailing-whitespace | ||
args: ["--markdown-linebreak-ext=md"] | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 23.10.0 # Replace by any tag/version: https://github.com/psf/black/tags | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v3.17.0 | ||
hooks: | ||
- id: black | ||
language_version: python3 # Should be a command that runs python3.6.2+ | ||
- id: pyupgrade | ||
args: ["--py39-plus"] | ||
|
||
- repo: https://github.com/asottile/add-trailing-comma | ||
rev: v3.1.0 | ||
hooks: | ||
- id: add-trailing-comma | ||
|
||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.6.9 | ||
hooks: | ||
- id: ruff | ||
args: [ --fix ] | ||
- id: ruff-format |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
# Package and package dependencies | ||
-e . | ||
|
||
# Development dependencies | ||
setuptools>=75.1.0,<76.2 | ||
wheel>=0.44.0,<0.45 | ||
twine>=5.1.1,<5.2 | ||
coverage>=7.6.2,<7.7 | ||
|
||
# Linters and formatters | ||
pre-commit>=4.0.1,<4.2 | ||
|
||
# TestApp dependencies | ||
django>=4.2,<5.2 | ||
jsonschema>=4.23.0,<4.24 | ||
|
||
# Linters and formatters | ||
pre-commit>=4.0.1,<4.2 | ||
|
||
# Development dependencies | ||
setuptools>=75.1.0,<76.2 | ||
twine>=5.1.1,<5.2 | ||
wheel>=0.44.0,<0.45 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,8 @@ | ||
#!/usr/bin/env python | ||
import os | ||
import sys | ||
from django.core.management import execute_from_command_line | ||
|
||
if __name__ == "__main__": | ||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "core.settings") | ||
try: | ||
from django.core.management import execute_from_command_line | ||
except ImportError: | ||
# The above import may fail for some other reason. Ensure that the | ||
# issue is really that Django is missing to avoid masking other | ||
# exceptions on Python 2. | ||
try: | ||
import django | ||
except ImportError: | ||
raise ImportError( | ||
"Couldn't import Django. Are you sure it's installed and " | ||
"available on your PYTHONPATH environment variable? Did you " | ||
"forget to activate a virtual environment?" | ||
) | ||
raise | ||
execute_from_command_line(sys.argv) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,7 @@ def test_successful_jsonschema_validation(self): | |
{ | ||
"email": "[email protected]", | ||
"not_validated_phone": "+431234567", | ||
} | ||
}, | ||
) | ||
|
||
def test_failed_jsonschema_validation_invalid_email(self): | ||
|
@@ -43,7 +43,7 @@ def test_failed_jsonschema_validation_invalid_email(self): | |
{ | ||
"email": "invalid_email", | ||
"not_validated_phone": "+431234567", | ||
} | ||
}, | ||
) | ||
|
||
def test_failed_jsonschema_validation_additional_fields(self): | ||
|
@@ -68,5 +68,5 @@ def test_failed_jsonschema_validation_additional_fields(self): | |
{ | ||
"email": "[email protected]", | ||
"phone": "+431234567", | ||
} | ||
}, | ||
) |