Skip to content

Commit

Permalink
Bump mypy from 1.10.1 to 1.11.1 (#1963)
Browse files Browse the repository at this point in the history
  • Loading branch information
dependabot[bot] authored Aug 26, 2024
1 parent 40aa041 commit 0f093bc
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 35 deletions.
58 changes: 29 additions & 29 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 src/palace/manager/feed/annotator/circulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def is_work_entry_solo(self, work: Work) -> bool:
:rtype: bool
"""
return any(
work in x # type: ignore[operator] # Mypy gets confused with complex "in" statements
work in x
for x in (
self.active_loans_by_work,
self.active_holds_by_work,
Expand Down
2 changes: 1 addition & 1 deletion tests/manager/api/odl/test_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def test__unknown_auth_type(
self, authenticated_get_fixture: AuthenticatedGetFixture
) -> None:
authenticated_get = authenticated_get_fixture.authenticated_get(
auth_type="invalid"
auth_type="invalid" # type: ignore[arg-type]
)
with pytest.raises(PalaceValueError) as exc_info:
authenticated_get._get(
Expand Down
5 changes: 3 additions & 2 deletions tests/manager/api/saml/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@

from palace.manager.api.saml.configuration.model import (
SAMLOneLoginConfiguration,
SAMLWebSSOAuthLibrarySettings,
SAMLWebSSOAuthSettings,
)
from palace.manager.api.saml.metadata.model import (
SAMLIdentityProviderMetadata,
SAMLServiceProviderMetadata,
)
from palace.manager.api.saml.provider import SAMLWebSSOAuthenticationProvider
from palace.manager.integration.settings import BaseSettings
from tests.mocks.saml_strings import CORRECT_XML_WITH_ONE_SP

if TYPE_CHECKING:
Expand All @@ -43,12 +43,13 @@ def create_saml_provider(
create_saml_configuration: Callable[..., SAMLWebSSOAuthSettings],
) -> Callable[..., SAMLWebSSOAuthenticationProvider]:
library = controller_fixture.db.default_library()
assert library.id is not None
return partial(
SAMLWebSSOAuthenticationProvider,
library_id=library.id,
integration_id=mock_integration_id,
settings=create_saml_configuration(),
library_settings=BaseSettings(),
library_settings=SAMLWebSSOAuthLibrarySettings(),
)


Expand Down
4 changes: 3 additions & 1 deletion tests/manager/api/test_authenticator.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,11 @@ def mock_integration_id() -> int:
def mock_basic(
db: DatabaseTransactionFixture, mock_integration_id: int
) -> MockBasicFixture:
library_id = db.default_library().id
assert library_id is not None
return partial(
MockBasic,
library_id=db.default_library().id,
library_id=library_id,
integration_id=mock_integration_id,
)

Expand Down
1 change: 1 addition & 0 deletions tests/manager/api/test_sirsidynix_auth_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,7 @@ def test_full_auth_request(
library_identifier_restriction_type=restriction_type,
library_identifier_restriction_criteria=restriction,
)
assert library.id is not None
provider = sirsi_auth_fixture.provider(
library_id=library.id,
library_settings=library_settings,
Expand Down
2 changes: 1 addition & 1 deletion tests/migration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def fixture(
library_id: int | None = None,
associate_library: bool = False,
) -> int:
if type(value) in (tuple, list, dict):
if type(value) in (tuple, list, dict): # type: ignore[comparison-overlap]
value = json.dumps(value)
setting = connection.execute(
"INSERT INTO configurationsettings (key, value, external_integration_id, library_id) VALUES (%s, %s, %s, %s) returning id",
Expand Down

0 comments on commit 0f093bc

Please sign in to comment.