Skip to content

Commit feed7c7

Browse files
committed
Switch from mypy to ty
1 parent f01dd35 commit feed7c7

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ all: check
2323

2424
check: lint test
2525

26-
lint: ruff mypy
26+
lint: ruff ty
2727

2828
ruff:
2929
uvx ruff check
3030

31-
mypy:
32-
uvx mypy --strict src
31+
ty:
32+
uvx ty check
3333

3434
test:
3535
uv run pytest -vv --cov=weechat_script_lint --cov-report=term-missing

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,8 @@ select = ["ALL"]
6161
"PLR2004", # magic-value-comparison
6262
"S101", # assert
6363
]
64+
65+
[tool.ty.src]
66+
exclude = [
67+
"tests/scripts/**/*.py",
68+
]

src/weechat_script_lint/lint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ def check_scripts(args: argparse.Namespace) -> tuple[int, int]:
256256
scores: dict[pathlib.Path, int] = {}
257257
ignored_files = (args.ignore_files or "").split(",")
258258
for path in args.path:
259-
scripts = get_scripts(path, args, ignored_files)
259+
scripts = get_scripts(path, args, ignored_files) # ty: ignore[invalid-argument-type]
260260
for path_script in scripts:
261261
# check script
262262
num_scripts += 1

0 commit comments

Comments
 (0)