-
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 #1 from soratidus999/modernize
Modernize
- Loading branch information
Showing
26 changed files
with
808 additions
and
541 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,23 +1,23 @@ | ||
[run] | ||
branch = True | ||
source = | ||
taxtools | ||
|
||
omit = | ||
*/taxtools/migrations/* | ||
*/taxtools/audit_views/* | ||
*/taxtools/task_helpers/* | ||
*/tests/* | ||
*/.tox/* | ||
*/bin/* | ||
|
||
[report] | ||
exclude_lines = | ||
if self.debug: | ||
pragma: no cover | ||
raise NotImplementedError | ||
if __name__ == .__main__.: | ||
def __repr__ | ||
raise AssertionError | ||
|
||
ignore_errors = True | ||
[run] | ||
branch = True | ||
source = | ||
taxtools | ||
|
||
omit = | ||
*/taxtools/migrations/* | ||
*/taxtools/audit_views/* | ||
*/taxtools/task_helpers/* | ||
*/tests/* | ||
*/.tox/* | ||
*/bin/* | ||
|
||
[report] | ||
exclude_lines = | ||
if self.debug: | ||
pragma: no cover | ||
raise NotImplementedError | ||
if __name__ == .__main__.: | ||
def __repr__ | ||
raise AssertionError | ||
|
||
ignore_errors = True |
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,20 +1,115 @@ | ||
# Apply to all files without committing: | ||
# pre-commit run --all-files | ||
# Update this file: | ||
# pre-commit autoupdate | ||
|
||
repos: | ||
# Code Upgrades | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v3.15.2 | ||
hooks: | ||
- id: pyupgrade | ||
args: [--py38-plus] | ||
- repo: https://github.com/adamchainz/django-upgrade | ||
rev: 1.17.0 | ||
hooks: | ||
- id: django-upgrade | ||
args: [--target-version=4.0] | ||
# Code Logic | ||
- repo: https://github.com/pycqa/isort | ||
rev: 5.13.2 | ||
hooks: | ||
- id: isort | ||
name: isort (python) | ||
- repo: https://github.com/pre-commit/pygrep-hooks | ||
rev: v1.10.0 | ||
hooks: | ||
- id: python-check-mock-methods | ||
- id: python-no-log-warn | ||
- id: python-use-type-annotations | ||
- id: text-unicode-replacement-char | ||
# Formatting | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.3.0 | ||
rev: v4.6.0 | ||
hooks: | ||
# Identify invalid files | ||
- id: check-ast | ||
- id: check-yaml | ||
- id: check-json | ||
- id: check-toml | ||
- id: check-xml | ||
# git checks | ||
- id: check-merge-conflict | ||
- id: check-added-large-files | ||
args: [--maxkb=1000] | ||
- id: detect-private-key | ||
- id: check-case-conflict | ||
# Python checks | ||
# - id: check-docstring-first | ||
- id: debug-statements | ||
# - id: requirements-txt-fixer | ||
- id: fix-encoding-pragma | ||
args: [--remove] | ||
- id: fix-byte-order-marker | ||
# General quality checks | ||
- id: mixed-line-ending | ||
args: [--fix=lf] | ||
- id: trailing-whitespace | ||
args: [--markdown-linebreak-ext=md] | ||
exclude: | | ||
(?x)( | ||
\.min\.css| | ||
\.min\.js| | ||
\.po| | ||
\.mo| | ||
swagger\.json | ||
) | ||
- id: check-executables-have-shebangs | ||
- id: end-of-file-fixer | ||
exclude: \.min\.css$ | ||
- repo: https://github.com/pre-commit/mirrors-autopep8 | ||
rev: "v1.7.0" | ||
exclude: | | ||
(?x)( | ||
\.min\.css| | ||
\.min\.js| | ||
\.po| | ||
\.mo| | ||
swagger\.json | ||
) | ||
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python | ||
rev: 2.7.3 | ||
hooks: | ||
- id: autopep8 | ||
- repo: https://github.com/pre-commit/mirrors-prettier | ||
rev: "v3.0.0-alpha.0" | ||
- id: editorconfig-checker | ||
exclude: | | ||
(?x)( | ||
LICENSE| | ||
allianceauth\/static\/allianceauth\/css\/themes\/bootstrap-locals.less| | ||
\.po| | ||
\.mo| | ||
swagger\.json | ||
) | ||
- repo: https://github.com/pycqa/flake8 | ||
rev: 7.0.0 | ||
hooks: | ||
- id: prettier | ||
- repo: https://github.com/pycqa/isort | ||
rev: 5.10.1 | ||
- id: flake8 | ||
additional_dependencies: [Flake8-pyproject] | ||
- repo: https://github.com/asottile/yesqa | ||
rev: v1.5.0 | ||
hooks: | ||
- id: isort | ||
name: isort (python) | ||
- id: yesqa | ||
# Infrastructure | ||
- repo: https://github.com/tox-dev/pyproject-fmt | ||
rev: 2.1.1 | ||
hooks: | ||
- id: pyproject-fmt | ||
name: pyproject.toml formatter | ||
description: "Format the pyproject.toml file." | ||
args: | ||
- --indent=4 | ||
additional_dependencies: | ||
- tox==4.14.2 # https://github.com/tox-dev/tox/releases/latest | ||
|
||
- repo: https://github.com/abravalheri/validate-pyproject | ||
rev: v0.17 | ||
hooks: | ||
- id: validate-pyproject | ||
name: Validate pyproject.toml | ||
description: "Validate the pyproject.toml file." |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
filters: | ||
- filter_type: file | ||
file_format: PO | ||
source_file: taxtools/locale/en/LC_MESSAGES/django.po | ||
source_language: en | ||
translation_files_expression: taxtools/locale/<lang>/LC_MESSAGES/django.po | ||
|
||
- filter_type: file | ||
file_format: KEYVALUEJSON | ||
source_language: en | ||
source_file: frontend/locales/en.translation.json | ||
translation_files_expression: frontend/locales/<lang>.translation.json | ||
|
||
settings: | ||
language_mapping: | ||
zh-Hans: zh_Hans |
Oops, something went wrong.