Skip to content

Commit 5d91fdb

Browse files
committed
mypy -> ty
1 parent 70c6d96 commit 5d91fdb

File tree

6 files changed

+9
-11
lines changed

6 files changed

+9
-11
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ uvx copier copy --trust gh:branchvincent/python-template .
1616
- Formatting: [Ruff](https://docs.astral.sh/ruff/formatter/)
1717
- Testing: [pytest](https://docs.pytest.org/en/latest/)
1818
- Linting: [Ruff](https://docs.astral.sh/ruff/linter/) and [pre-commit](https://pre-commit.com/)
19-
- Typing: [mypy](https://mypy.readthedocs.io/en/stable/)
19+
- Typing: [ty](https://docs.astral.sh/ty/)
2020
- Task runner: [taskipy](https://github.com/illBeRoy/taskipy)
2121
- CI/CD: [Github Actions](https://docs.github.com/en/actions)
2222
- Automated versioning, changelog, and release via [Conventional Commits](https://www.conventionalcommits.org/)

src/.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ repos:
1313
require_serial: true
1414
language: system
1515
types: [python]
16-
- id: mypy
17-
name: mypy
18-
entry: uv run mypy
16+
- id: ty
17+
name: ty
18+
entry: uv run ty check
1919
require_serial: true
2020
language: system
2121
types: [python]

src/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ uv run task --list
2727
To ensure code quality, we use the following tools:
2828

2929
- Formatting and linting: [ruff](https://docs.astral.sh/ruff/)
30-
- Type checking: [mypy](https://mypy.readthedocs.io/en/stable/)
30+
- Type checking: [ty](https://docs.astral.sh/ty/)
3131

3232
To run these:
3333

src/README.md.jinja

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
[![pypi version](https://img.shields.io/pypi/v/{{project_name}}.svg)](https://pypi.org/project/{{project_name}}/)
66
{% endif -%}
77
[![ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
8-
[![checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)
98

109
{{project_description}}
1110

src/pyproject.toml.jinja

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ classifiers = ["Private :: Do Not Upload"]
1515
{%- if docs %}
1616
docs = ["mkdocs", "mkdocs-material"]
1717
{%- endif %}
18-
dev = ["mypy", "pre-commit", "pytest", "ruff", "taskipy"]
18+
dev = ["pre-commit", "pytest", "ruff", "taskipy", "ty"]
1919

2020
[tool.taskipy.tasks]
2121
clean = { cmd = "rm -rf .*_cache/ dist/", help = "Remove build artifacts" }
@@ -25,9 +25,8 @@ docs = { cmd = "mkdocs serve -f docs/mkdocs.yaml", help = "Serve documentation"}
2525
lint = { cmd = "pre-commit run --all-files", help = "Run linters and formatters" }
2626
test = { cmd = "pytest", help = "Run tests" }
2727

28-
[tool.mypy]
29-
strict = true
30-
ignore_missing_imports = true
28+
[tool.ty]
29+
terminal = { output-format = "concise" }
3130

3231
[tool.pytest.ini_options]
3332
testpaths = ["tests"]

src/src/{{project_name}}/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
from importlib.metadata import version
22

3-
__version__ = version(__package__)
3+
__version__ = version(__package__) # type: ignore

0 commit comments

Comments
 (0)