Skip to content

Commit

Permalink
Merge pull request #1 from soratidus999/modernize
Browse files Browse the repository at this point in the history
Modernize
  • Loading branch information
soratidus999 authored May 17, 2024
2 parents 2cdf2e5 + 737d46a commit 488b66c
Show file tree
Hide file tree
Showing 26 changed files with 808 additions and 541 deletions.
46 changes: 23 additions & 23 deletions .coveragerc
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
119 changes: 107 additions & 12 deletions .pre-commit-config.yaml
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."
16 changes: 16 additions & 0 deletions .tx/transifex.yml
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
Loading

0 comments on commit 488b66c

Please sign in to comment.