Skip to content

Commit

Permalink
Bump typeguard from 2.13.3 to 4.2.1 (#1122)
Browse files Browse the repository at this point in the history
  • Loading branch information
dependabot[bot] authored Apr 16, 2024
1 parent 5bc7139 commit 38b85ea
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 18 deletions.
8 changes: 7 additions & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ def mypy(session: Session) -> None:
"types-dateparser",
"types-tabulate",
"types-tzlocal",
"typeguard",
"pytest-asyncio",
"aioresponses",
)
Expand All @@ -129,7 +130,12 @@ def tests(session: Session) -> None:
"""Run the test suite."""
session.install(".[cli]")
session.install(
"coverage[toml]", "pytest", "pygments", "pytest-asyncio", "aioresponses"
"coverage[toml]",
"pytest",
"pygments",
"pytest-asyncio",
"aioresponses",
"typeguard",
)
try:
session.run("coverage", "run", "--parallel", "-m", "pytest", *session.posargs)
Expand Down
24 changes: 14 additions & 10 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pytest = ">=7.3.1,<9.0.0"
coverage = {extras = ["toml"], version = "^7.2"}
safety = ">=2.3.5,<4.0.0"
mypy = "^1.2"
typeguard = "^2.13.3"
typeguard = ">=2.13.3,<5.0.0"
xdoctest = {extras = ["colors"], version = "^1.1.1"}
sphinx = ">=4.3.2,<8.0.0"
sphinx-autobuild = "^2021.3.14"
Expand Down
10 changes: 6 additions & 4 deletions tests/cli/test_vehicle.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from aioresponses import aioresponses
from aioresponses.core import RequestCall
from click.testing import CliRunner
from typeguard import suppress_type_checks
from yarl import URL

from tests import fixtures
Expand Down Expand Up @@ -497,10 +498,11 @@ def test_http_post_file(
json_file = tmpdir.mkdir("json").join("sample.json")
json_file.write(json.dumps(body))

result = cli_runner.invoke(
__main__.main,
f"http post-file {endpoint} '{json_file}'", # noqa: B907
)
with suppress_type_checks():
result = cli_runner.invoke(
__main__.main,
f"http post-file {endpoint} '{json_file}'",
)
assert result.exit_code == 0, result.exception

expected_output = (
Expand Down
5 changes: 3 additions & 2 deletions tests/test_credential_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from unittest import mock

import pytest
from typeguard import suppress_type_checks

from tests.const import TEST_LOGIN_TOKEN
from tests.const import TEST_PERSON_ID
Expand Down Expand Up @@ -35,11 +36,11 @@ def test_invalid_credential() -> None:
credential_store = CredentialStore()

test_key = "test"
with pytest.raises(TypeError):
with suppress_type_checks(), pytest.raises(TypeError):
credential_store[test_key] = test_key # type:ignore

test_value = Credential("test_value")
with pytest.raises(TypeError):
with suppress_type_checks(), pytest.raises(TypeError):
credential_store[test_value] = test_value # type:ignore


Expand Down

0 comments on commit 38b85ea

Please sign in to comment.