Skip to content

Commit

Permalink
⚰️ Delete unused type var
Browse files Browse the repository at this point in the history
  • Loading branch information
sergei-maertens committed May 23, 2024
1 parent 09d58d2 commit 962342d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
10 changes: 2 additions & 8 deletions mozilla_django_oidc_db/backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import fnmatch
import logging
from collections.abc import Collection
from typing import Any, TypeAlias, TypeVar, cast
from typing import Any, TypeAlias, cast

from django.contrib.auth import get_user_model
from django.contrib.auth.models import (
Expand All @@ -23,20 +23,14 @@
from .config import dynamic_setting, get_setting_from_config, lookup_config
from .exceptions import MissingIdentifierClaim
from .jwt import verify_and_decode_token
from .models import (
OpenIDConnectConfig,
OpenIDConnectConfigBase,
UserInformationClaimsSources,
)
from .models import OpenIDConnectConfigBase, UserInformationClaimsSources
from .typing import ClaimPath, JSONObject
from .utils import extract_content_type, obfuscate_claims

logger = logging.getLogger(__name__)

AnyUser: TypeAlias = AnonymousUser | AbstractBaseUser

T = TypeVar("T", bound=OpenIDConnectConfig)

missing = object()


Expand Down
6 changes: 3 additions & 3 deletions tests/test_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -657,11 +657,11 @@ def test_init_does_not_perform_config_io(mocker):
* pytest will complain about database access which is forbidden because there is
no pytest.mark.django_db present (deliberately)
"""
m_get_solo = mocker.patch(
"mozilla_django_oidc_db.backends.OpenIDConnectConfig.get_solo"
m_get_setting = mocker.patch(
"mozilla_django_oidc_db.backends.get_setting_from_config"
)

# instantiate
OIDCAuthenticationBackend()

m_get_solo.assert_not_called()
m_get_setting.assert_not_called()

0 comments on commit 962342d

Please sign in to comment.