Skip to content

Commit c77d40f

Browse files
Merge pull request #2468 from VWS-Python/strict-mypy-kwargs-plugin
Strict mypy kwargs plugin
2 parents 35076a8 + 41ff5c8 commit c77d40f

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ This requires Python |minimum-python-version|\+.
3232
database = VuforiaDatabase()
3333
mock.add_database(database=database)
3434
# This will use the Vuforia mock.
35-
requests.get("https://vws.vuforia.com/summary", timeout=30)
35+
requests.get(url="https://vws.vuforia.com/summary", timeout=30)
3636
3737
By default, an exception will be raised if any requests to unmocked addresses are made.
3838

docs/source/basic-example.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Using the mock redirects requests to Vuforia made with `requests`_ to an in-memo
1313
database = VuforiaDatabase()
1414
mock.add_database(database=database)
1515
# This will use the Vuforia mock.
16-
requests.get("https://vws.vuforia.com/summary", timeout=30)
16+
requests.get(url="https://vws.vuforia.com/summary", timeout=30)
1717
1818
By default, an exception will be raised if any requests to unmocked addresses are made.
1919

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ optional-dependencies.dev = [
6565
"furo==2024.8.6",
6666
"interrogate==1.7.0",
6767
"mypy[faster-cache]==1.14.0",
68+
"mypy-strict-kwargs==2024.12.24",
6869
"pre-commit==4.0.1",
6970
"pydocstyle==6.3",
7071
"pyenchant==3.3.0rc1",
@@ -390,6 +391,7 @@ files = [ "." ]
390391
exclude = [ "build" ]
391392
plugins = [
392393
"pydantic.mypy",
394+
"mypy_strict_kwargs",
393395
]
394396
follow_untyped_imports = true
395397

tests/mock_vws/utils/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def auth_header_content_type(self) -> str:
8282
"""
8383
The content type to use for the `Authorization` header.
8484
"""
85-
full_content_type = self.headers.get("Content-Type", "")
85+
full_content_type = dict(self.headers).get("Content-Type", "")
8686
return full_content_type.split(sep=";")[0]
8787

8888

0 commit comments

Comments
 (0)