Skip to content

Commit a100dce

Browse files
committed
Remove option to choose mypy
1 parent 07eca96 commit a100dce

File tree

6 files changed

+11
-38
lines changed

6 files changed

+11
-38
lines changed

copier.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,6 @@ project_description:
2424
type: str
2525
default: "This is a repository for modern data science projects."
2626

27-
type_checker:
28-
type: str
29-
choices: ["mypy", "ty"]
30-
default: "ty"
31-
when: "{{ python }}"
32-
3327
project_features:
3428
type: str
3529
multiselect: true

template/.devcontainer/devcontainer.json.jinja

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@
4040
"tamasfe.even-better-toml",
4141
"nefrob.vscode-just-syntax"{% if python %},
4242
"ms-python.python",
43-
"charliermarsh.ruff"{% if type_checker == 'ty' %},
44-
"astral-sh.ty"{% endif %}{% endif %}{% if r_data_science %},
43+
"charliermarsh.ruff",
44+
"astral-sh.ty"{% endif %}{% if r_data_science %},
4545
"REditorSupport.r",
4646
"RDebugger.r-debugger",
4747
"Posit.air-vscode",

template/Justfile.jinja

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ check:
1818
uv lock --locked
1919
echo "🚀 Linting code: Running pre-commit"
2020
uv run pre-commit run -a
21-
echo "🚀 Static type checking: Running {% if type_checker == "mypy" %}mypy{% else %}ty{% endif %}"
22-
uv run {% if type_checker == "mypy" %}mypy{% else %}ty check{% endif %}
21+
echo "🚀 Static type checking: Running ty"
22+
uv run ty check
2323
echo "🚀 Checking for obsolete dependencies: Running deptry"
2424
uv run deptry .
2525

template/{% if python %}.pre-commit-config.yaml{% endif %}.jinja

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,7 @@ repos:
66
args: [--fix]
77
- id: ruff-format
88

9-
{% if type_checker == 'mypy' %} - repo: https://github.com/pre-commit/mirrors-mypy
10-
rev: v1.8.0
11-
hooks:
12-
- id: mypy
13-
additional_dependencies: [types-all]
14-
{% endif %} - repo: https://github.com/pre-commit/pre-commit-hooks
9+
- repo: https://github.com/pre-commit/pre-commit-hooks
1510
rev: v4.4.0
1611
hooks:
1712
- id: trailing-whitespace

template/{% if python %}pyproject.toml{% endif %}.jinja

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@ dev = [
3838
"pytest-cov>=4.0.0",
3939
"pre-commit>=3.5.0",
4040
"ruff>=0.11.5",
41-
{% if type_checker == 'mypy' %} "mypy>=1.8.0",
42-
{% endif %}{% if type_checker == 'ty' %} "ty>=0.0.1a16",
43-
{% endif %} "deptry>=0.20.0",
41+
"ty>=0.0.1a21", "deptry>=0.20.0",
4442
{% if python_package %} "mkdocs>=1.6.0",
4543
"mkdocs-material>=9.5.0",
4644
"mkdocstrings[python]>=0.26.1",
@@ -71,19 +69,6 @@ ignore = ["E501"]
7169
[tool.ruff.lint.per-file-ignores]
7270
"tests/*" = ["S101"]
7371

74-
{% if type_checker == 'ty' %}[tool.ty.environment]
72+
[tool.ty.environment]
7573
python = "./.venv"
7674
python-version = "3.13"
77-
{% endif %}{% if type_checker == 'mypy' %}
78-
[tool.mypy]
79-
files = [
80-
"{{ project_slug }}"
81-
]
82-
disallow_untyped_defs = true
83-
disallow_any_unimported = true
84-
no_implicit_optional = true
85-
check_untyped_defs = true
86-
warn_return_any = true
87-
warn_unused_ignores = true
88-
show_error_codes = true
89-
{% endif %}

template/{% if use_github %}.github{% endif %}/workflows/{% if use_github and python %}main.yml{% endif %}.jinja

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,13 @@ jobs:
1717
- name: Set up the environment
1818
uses: ./.github/actions/setup-python-env
1919

20-
- name: Install prek for pre-commit hooks
20+
- name: Run ruff and other pre-commit hooks
2121
uses: j178/prek-action@v1
2222

23-
- name: Run checks
23+
- name: Run ty and deptry
2424
run: |
2525
uv lock --locked
26-
prek run -a
27-
uv run {% if type_checker == "mypy" %}mypy{% else %}ty check{% endif %}
26+
uv run ty check
2827
uv run deptry .
2928

3029
tests-and-type-check:
@@ -49,7 +48,7 @@ jobs:
4948
run: uv run python -m pytest tests
5049

5150
- name: Check typing
52-
run: uv run {% if type_checker == "mypy" %}mypy{% else %}ty check{% endif %}
51+
run: uv run ty check
5352

5453
{% if python_package %}
5554
check-docs:

0 commit comments

Comments
 (0)