mypy: exclude tests, ignore test errors; clean unused ignores; CI: type-check src only

This commit is contained in:
d-k-patel
2025-08-19 14:44:59 +05:30
parent f819b85ec8
commit 42e49c5671
3 changed files with 9 additions and 5 deletions

View File

@@ -55,7 +55,7 @@ jobs:
ruff format --check src tests
- name: Type check with mypy
run: mypy src tests --install-types --non-interactive
run: mypy src --install-types --non-interactive
- name: Test with pytest
run: pytest -v --cov=ai_ffmpeg_cli --cov-report=xml

View File

@@ -162,10 +162,14 @@ warn_no_return = true
warn_unreachable = true
strict_equality = true
show_error_codes = true
exclude = [
"^tests/",
]
[[tool.mypy.overrides]]
module = "tests.*"
disallow_untyped_defs = false
module = ["tests.*"]
# Completely ignore type errors in tests to keep the focus on library types
ignore_errors = true
# Pytest configuration
[tool.pytest.ini_options]

View File

@@ -76,9 +76,9 @@ class FfmpegIntent(BaseModel):
# start/end: allow numeric seconds -> HH:MM:SS[.ms]
if "start" in values and not isinstance(values.get("start"), str):
values["start"] = _seconds_to_timestamp(values["start"]) # type: ignore[index]
values["start"] = _seconds_to_timestamp(values["start"])
if "end" in values and not isinstance(values.get("end"), str):
values["end"] = _seconds_to_timestamp(values["end"]) # type: ignore[index]
values["end"] = _seconds_to_timestamp(values["end"])
return values
@model_validator(mode="after")