diff --git a/pyproject.toml b/pyproject.toml index dda47e24e..833bfe25b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -88,6 +88,7 @@ optional-dependencies.dev = [ "sphinxcontrib-spelling==8", "sybil==6.1.1", "tenacity==9.0.0", + "typeguard==4.3.0", "types-docker==7.1.0.20240821", "types-pillow==10.2.0.20240520", "types-pyyaml==6.0.12.20240808", @@ -322,6 +323,9 @@ keep_full_version = true xfail_strict = true log_cli = true +typeguard-packages = """ +tests +""" addopts = [ "--strict-markers", ] diff --git a/tests/mock_vws/test_add_target.py b/tests/mock_vws/test_add_target.py index 3f549f013..52210a152 100644 --- a/tests/mock_vws/test_add_target.py +++ b/tests/mock_vws/test_add_target.py @@ -378,7 +378,7 @@ def test_name_valid( ], ) def test_name_invalid( - name: str, + name: str | int | None, image_file_failed_state: io.BytesIO, status_code: int, vws_client: VWS, @@ -392,7 +392,7 @@ def test_name_invalid( expected_exception=OopsAnErrorOccurredPossiblyBadName, ) as oops_exc: vws_client.add_target( - name=name, + name=name, # type: ignore[arg-type] width=1, image=image_file_failed_state, application_metadata=None, @@ -404,7 +404,7 @@ def test_name_invalid( with pytest.raises(expected_exception=Fail) as exc: vws_client.add_target( - name=name, + name=name, # type: ignore[arg-type] width=1, image=image_file_failed_state, application_metadata=None, diff --git a/tests/mock_vws/test_update_target.py b/tests/mock_vws/test_update_target.py index 2b7b3faf2..4fd4000fa 100644 --- a/tests/mock_vws/test_update_target.py +++ b/tests/mock_vws/test_update_target.py @@ -545,7 +545,7 @@ def test_name_valid( ], ) def test_name_invalid( - name: str, + name: str | int | None, target_id: str, vuforia_database: VuforiaDatabase, vws_client: VWS,