mirror of
https://github.com/d-k-patel/ai-ffmpeg-cli.git
synced 2025-10-09 13:42:56 +03:00
mypy: exclude tests, ignore test errors; clean unused ignores; CI: type-check src only
This commit is contained in:
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@@ -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
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user