[PATCH v2 01/14] Add ci script and mypy suppressions
Tamir Duberstein <[email protected]>
| Newsgroups | org.kernel.linux.tools |
|---|---|
| Message-ID | <[email protected]> |
Add a simple shell script that runs mypy and pytest. Introduce targeted mypy suppressions for current test-only issues so the baseline is green before tightening types further. Also add pytest-asyncio so pytest recognizes asyncio_default_fixture_loop_scope and stops warning about it. Signed-off-by: Tamir Duberstein <[email protected]> --- ci.sh | 6 ++++++ pyproject.toml | 14 ++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/ci.sh b/ci.sh new file mode 100755 index 0000000..1e8ccb3 --- /dev/null +++ b/ci.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env sh + +set -eu + +uv run mypy . +uv run pytest --durations=0 diff --git a/pyproject.toml b/pyproject.toml index 2353a18..e31a05c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,6 +40,7 @@ dev = [ "build", "mypy", "pytest", + "pytest-asyncio", "ruff", "types-requests", ] @@ -56,5 +57,18 @@ strict = true module = "authheaders" ignore_missing_imports = true +[[tool.mypy.overrides]] +module = [ + "test_email_utils", + "test_formatting", + "test_message", + "test_thread", +] +disable_error_code = ["attr-defined"] + +[[tool.mypy.overrides]] +module = "test_auth_headers" +disable_error_code = ["unused-ignore"] + [tool.ruff] target-version = "py39" -- 2.53.0