Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Add stricter mypy options #15694

Merged
merged 8 commits into from
May 31, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ no_implicit_optional = True

# Strict checks, see mypy --help
warn_unused_configs = True
disallow_subclassing_any = True
disallow_untyped_defs = True
warn_redundant_casts = True
warn_unused_ignores = True
Expand Down
2 changes: 1 addition & 1 deletion synapse/api/auth/msc3861_delegated.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def scope_to_list(scope: str) -> List[str]:
return scope.strip().split(" ")


class PrivateKeyJWTWithKid(PrivateKeyJWT):
class PrivateKeyJWTWithKid(PrivateKeyJWT): # type: ignore[misc]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'd need stubs/annotations for authlib for this to go away, I think? Ditto for LogoutToken.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but I figured since there was only 2 instances it was better to enable the option to ignore it twice?

"""An implementation of the private_key_jwt client auth method that includes a kid header.

This is needed because some providers (Keycloak) require the kid header to figure
Expand Down
2 changes: 1 addition & 1 deletion synapse/handlers/oidc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1354,7 +1354,7 @@ async def handle_backchannel_logout(
finish_request(request)


class LogoutToken(JWTClaims):
class LogoutToken(JWTClaims): # type: ignore[misc]
"""
Holds and verify claims of a logout token, as per
https://openid.net/specs/openid-connect-backchannel-1_0.html#LogoutToken
Expand Down