From 8753d910397a12f831fb4e3605a658ceacc9c862 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 24 Dec 2024 06:24:09 +0000 Subject: [PATCH 1/4] Add new plugin --- pyproject.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 635017fb8..f4090dcea 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.23.2", "pre-commit==4.0.1", "pydocstyle==6.3", "pyenchant==3.3.0rc1", @@ -383,6 +384,7 @@ files = [ "." ] exclude = [ "build" ] plugins = [ "pydantic.mypy", + "mypy_strict_kwargs", ] follow_untyped_imports = true From f4d122f54cdb813106fad7ae830c7a64493b1514 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 24 Dec 2024 10:12:44 +0000 Subject: [PATCH 2/4] Fix one keyword argument --- tests/mock_vws/utils/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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] From ea2a58974e1164d240674e928fb9cfaeef9e5787 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 24 Dec 2024 23:05:22 +0000 Subject: [PATCH 3/4] Bump plugin --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 814e278f1..dac8abf23 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -65,7 +65,7 @@ optional-dependencies.dev = [ "furo==2024.8.6", "interrogate==1.7.0", "mypy[faster-cache]==1.14.0", - "mypy-strict-kwargs==2024.12.23.2", + "mypy-strict-kwargs==2024.12.24", "pre-commit==4.0.1", "pydocstyle==6.3", "pyenchant==3.3.0rc1", From 41ff5c8b118b16294dbcde443abf415883480440 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 25 Dec 2024 00:10:34 +0000 Subject: [PATCH 4/4] Use more keyword arguments in docs --- README.rst | 2 +- docs/source/basic-example.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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.