Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ci:

repos:
- repo: https://github.com/commitizen-tools/commitizen
rev: v4.13.9
rev: v4.16.3
hooks:
- id: commitizen
stages: [commit-msg]
Expand All @@ -28,20 +28,20 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/tox-dev/pyproject-fmt
rev: "v2.18.1"
rev: "v2.23.0"
hooks:
- id: pyproject-fmt
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.10.2
rev: 0.11.17
hooks:
- id: uv-lock
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
rev: v4.0.0-alpha.8
hooks:
- id: prettier
args: ["--tab-width", "2"]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.1
rev: v0.15.15
hooks:
- id: ruff-check
args: [--fix, --exit-non-zero-on-fix, --unsafe-fixes]
Expand All @@ -51,11 +51,11 @@ repos:
hooks:
- id: codespell
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.19.1
rev: v2.1.0
hooks:
- id: mypy
additional_dependencies: [types-dateparser, attrs, types-requests]
- repo: https://github.com/34j/sync-python-matrix
rev: "d114faa" # Use the sha / tag you want to point at
rev: "d114faafeb9c187a37379d34256d3efc6042e187" # Use the sha / tag you want to point at
hooks:
- id: sync-python-matrix
40 changes: 20 additions & 20 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,25 @@ lint.isort.known-first-party = [ "aoiro", "tests" ]
[tool.pyproject-fmt]
max_supported_python = "3.14"

[tool.mypy]
mypy_path = "src/"
exclude = [
"docs/.*",
"setup.py",
]
disallow_any_generics = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
warn_unused_ignores = true
warn_unreachable = true
overrides = [ { module = "tests.*", allow_untyped_defs = true }, { module = "docs.*", ignore_errors = true } ]
no_implicit_optional = true
show_error_codes = true

[tool.pytest]
minversion = "9.0"
addopts = [ "-v", "-Wonce", "-p no:doctest", "--cov=aoiro", "--cov-report=term", "--cov-report=xml" ]
minversion = "9.0"
pythonpath = [ "src" ]

[tool.coverage]
Expand All @@ -112,28 +128,12 @@ report.exclude_lines = [
"raise NotImplementedError",
]

[tool.mypy]
check_untyped_defs = true
disallow_any_generics = true
disallow_incomplete_defs = true
disallow_untyped_defs = true
mypy_path = "src/"
no_implicit_optional = true
show_error_codes = true
warn_unreachable = true
warn_unused_ignores = true
exclude = [
"docs/.*",
"setup.py",
]
overrides = [ { module = "tests.*", allow_untyped_defs = true }, { module = "docs.*", ignore_errors = true } ]

[tool.semantic_release]
version_toml = [ "pyproject.toml:project.version" ]
version_variables = [
"src/aoiro/__init__.py:__version__",
"docs/conf.py:release",
"src/aoiro/__init__.py:__version__",
]
version_toml = [ "pyproject.toml:project.version" ]
build_command = """
pip install uv
uv lock
Expand All @@ -143,6 +143,7 @@ uv build
branches.main.match = "main"
branches.noop.match = "(?!main$)"
branches.noop.prerelease = true
changelog.environment.keep_trailing_newline = true
changelog.exclude_commit_patterns = [
"chore(?:\\([^)]*?\\))?: .+",
"ci(?:\\([^)]*?\\))?: .+",
Expand All @@ -153,4 +154,3 @@ changelog.exclude_commit_patterns = [
"Merged? .*",
"Initial [Cc]ommit.*", # codespell:ignore
]
changelog.environment.keep_trailing_newline = true
2 changes: 1 addition & 1 deletion tests/test_dunder_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

def test_can_run_as_python_module():
"""Run the CLI as a Python module."""
result = subprocess.run( # noqa: S603
result = subprocess.run(
[sys.executable, "-m", "aoiro", "--help"],
check=True,
capture_output=True,
Expand Down
Loading