Skip to content

Commit 589ed77

Browse files
slhckclaude
andcommitted
chore: replace mypy with ty for type checking
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 3d2b544 commit 589ed77

6 files changed

Lines changed: 35 additions & 87 deletions

File tree

.github/workflows/claude-code-review.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,4 @@ jobs:
7272
prompt: '/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}'
7373
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
7474
# or https://code.claude.com/docs/en/cli-reference for available options
75-
claude_args: '--allowed-tools "Bash(uv run pytest:*),Bash(uv run ruff:*),Bash(uv run mypy:*),Bash(python -m ffmpeg_normalize:*),Bash(gh pr:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr list:*)"'
75+
claude_args: '--allowed-tools "Bash(uv run pytest:*),Bash(uv run ruff:*),Bash(uv run ty check:*),Bash(python -m ffmpeg_normalize:*),Bash(gh pr:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr list:*)"'

.github/workflows/claude.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,4 @@ jobs:
7676
7777
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
7878
# or https://code.claude.com/docs/en/cli-reference for available options
79-
claude_args: '--allowed-tools "Bash(uv run pytest:*),Bash(uv run ruff:*),Bash(uv run mypy:*),Bash(python -m ffmpeg_normalize:*),Bash(gh:*)"'
79+
claude_args: '--allowed-tools "Bash(uv run pytest:*),Bash(uv run ruff:*),Bash(uv run ty check:*),Bash(python -m ffmpeg_normalize:*),Bash(gh:*)"'

.github/workflows/python-package.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ jobs:
5050
run: |
5151
uv run ruff check .
5252
uv run ruff format --check .
53-
- name: Type check with mypy
53+
- name: Type check with ty
5454
run: |
55-
uv run mypy .
55+
uv run ty check
5656
- name: Test with pytest
5757
run: |
5858
uv run pytest tests/

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ffmpeg-normalize is a Python utility for audio normalization using ffmpeg. It su
1515
### Code Quality
1616
- `uv run ruff check .` - Linting
1717
- `uv run ruff format .` - Code formatting
18-
- `uv run mypy src/ffmpeg_normalize` - Type checking
18+
- `uv run ty check` - Type checking
1919

2020
### Installation
2121
- `uv sync --dev` - Install all dependencies (runtime and development)

pyproject.toml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -52,19 +52,12 @@ package-data = {"ffmpeg_normalize" = ["data/**/*.json"]}
5252
dev = [
5353
"pytest>=8.1.1,<9",
5454
"ruff>=0.12.11",
55-
"mypy>=1.0.0",
5655
"types-tqdm",
5756
"shtab>=1.7.0",
57+
"ty>=0.0.24",
5858
]
5959

60-
[tool.mypy]
61-
python_version = "3.13"
62-
ignore_missing_imports = true
63-
exclude = ["build"]
64-
namespace_packages = false
65-
no_implicit_optional = true
66-
check_untyped_defs = true
67-
warn_return_any = true
68-
warn_unused_ignores = true
69-
show_error_codes = true
60+
[tool.ty.rules]
61+
invalid-argument-type = "warn"
62+
too-many-positional-arguments = "warn"
7063

0 commit comments

Comments
 (0)