Skip to content

Strict mypy kwargs plugin #2468

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Dec 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion docs/source/basic-example.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -390,6 +391,7 @@ files = [ "." ]
exclude = [ "build" ]
plugins = [
"pydantic.mypy",
"mypy_strict_kwargs",
]
follow_untyped_imports = true

Expand Down
2 changes: 1 addition & 1 deletion tests/mock_vws/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"""
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", "")

Check warning on line 85 in tests/mock_vws/utils/__init__.py

View check run for this annotation

Codecov / codecov/patch

tests/mock_vws/utils/__init__.py#L85

Added line #L85 was not covered by tests
return full_content_type.split(sep=";")[0]


Expand Down
Loading