diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e2ac395..ecf31b9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,40 +1,40 @@ -# repos: -# - repo: https://github.com/pre-commit/pre-commit-hooks -# rev: v4.6.0 -# hooks: -# - id: trailing-whitespace -# args: [--markdown-linebreak-ext=md] -# - id: end-of-file-fixer -# - id: check-toml -# - id: check-added-large-files -# args: ['--maxkb=1024'] -# - id: check-case-conflict -# - id: mixed-line-ending -# - repo: https://github.com/pycqa/isort -# rev: 5.13.2 -# hooks: -# - id: isort -# args: ["--profile", "black", "--filter-files"] -# - repo: https://github.com/psf/black -# rev: 24.8.0 -# hooks: -# - id: black -# - repo: https://github.com/asottile/pyupgrade -# rev: v3.17.0 -# hooks: -# - id: pyupgrade -# args: [--py311-plus] -# - repo: https://github.com/hhatto/autopep8 -# rev: v2.3.1 -# hooks: -# - id: autopep8 -# - repo: https://github.com/PyCQA/flake8 -# rev: "7.1.1" -# hooks: -# - id: flake8 -# additional_dependencies: -# - flake8-comprehensions -# - flake8-bugbear -# - flake8-polyfill -# - toml -# exclude: docs\/.* +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.6.0 + hooks: + - id: trailing-whitespace + args: [--markdown-linebreak-ext=md] + - id: end-of-file-fixer + - id: check-toml + - id: check-added-large-files + args: ['--maxkb=1024'] + - id: check-case-conflict + - id: mixed-line-ending +- repo: https://github.com/pycqa/isort + rev: 5.13.2 + hooks: + - id: isort + args: ["--profile", "black", "--filter-files"] +- repo: https://github.com/psf/black + rev: 24.8.0 + hooks: + - id: black +- repo: https://github.com/asottile/pyupgrade + rev: v3.17.0 + hooks: + - id: pyupgrade + args: [--py311-plus] +- repo: https://github.com/hhatto/autopep8 + rev: v2.3.1 + hooks: + - id: autopep8 +- repo: https://github.com/PyCQA/flake8 + rev: "7.1.1" + hooks: + - id: flake8 + additional_dependencies: + - flake8-comprehensions + - flake8-bugbear + - flake8-polyfill + - toml + exclude: docs\/.* diff --git a/tests/test_models.py b/tests/test_models.py deleted file mode 100644 index 2c9065c..0000000 --- a/tests/test_models.py +++ /dev/null @@ -1,13 +0,0 @@ -from typing import Literal, get_args, get_origin - -from merchants.orm import sqla - - -def test_Payment_status_type(): - assert get_origin(sqla.PaymentStatus) is Literal - - -def test_Payment_status_values(): - expected_values = ["Created", "Paid", "Rejected"] - for v in expected_values: - assert v in get_args(sqla.PaymentStatus)