diff --git a/README.rst b/README.rst index 52cd0dc66..d97f68f7d 100644 --- a/README.rst +++ b/README.rst @@ -32,7 +32,7 @@ This requires Python |minimum-python-version|\+. database = VuforiaDatabase() mock.add_database(database=database) # This will use the Vuforia mock. - requests.get("https://vws.vuforia.com/summary", timeout=30) + requests.get(url="https://vws.vuforia.com/summary", timeout=30) By default, an exception will be raised if any requests to unmocked addresses are made. diff --git a/docs/source/basic-example.rst b/docs/source/basic-example.rst index d7a28ed6b..35c12e200 100644 --- a/docs/source/basic-example.rst +++ b/docs/source/basic-example.rst @@ -13,7 +13,7 @@ Using the mock redirects requests to Vuforia made with `requests`_ to an in-memo database = VuforiaDatabase() mock.add_database(database=database) # This will use the Vuforia mock. - requests.get("https://vws.vuforia.com/summary", timeout=30) + requests.get(url="https://vws.vuforia.com/summary", timeout=30) By default, an exception will be raised if any requests to unmocked addresses are made. diff --git a/pyproject.toml b/pyproject.toml index f8e9e6483..dac8abf23 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -65,6 +65,7 @@ optional-dependencies.dev = [ "furo==2024.8.6", "interrogate==1.7.0", "mypy[faster-cache]==1.14.0", + "mypy-strict-kwargs==2024.12.24", "pre-commit==4.0.1", "pydocstyle==6.3", "pyenchant==3.3.0rc1", @@ -390,6 +391,7 @@ files = [ "." ] exclude = [ "build" ] plugins = [ "pydantic.mypy", + "mypy_strict_kwargs", ] follow_untyped_imports = true diff --git a/tests/mock_vws/utils/__init__.py b/tests/mock_vws/utils/__init__.py index 3edc7507e..b3b92db61 100644 --- a/tests/mock_vws/utils/__init__.py +++ b/tests/mock_vws/utils/__init__.py @@ -82,7 +82,7 @@ def auth_header_content_type(self) -> str: """ The content type to use for the `Authorization` header. """ - full_content_type = self.headers.get("Content-Type", "") + full_content_type = dict(self.headers).get("Content-Type", "") return full_content_type.split(sep=";")[0]