Skip to content

Add missing # type: ignore when using LocalProxy - #6094

Merged
quis merged 1 commit into
mainfrom
add-missing-ignore-localproxy
Sep 21, 2026
Merged

quis merged 1 commit into
mainfrom
add-missing-ignore-localproxy

Conversation

@quis

@quis quis commented Sep 15, 2026

Copy link
Copy Markdown
Member

Per 6060080 we need to lie to the type checker because there isn't yet a way of handling proxy objects in type hints.

We already do this in every other case, for example:

antivirus_client: AntivirusClient = LocalProxy(get_antivirus_client) # type: ignore[assignment]

Per 6060080 we need to lie to the type checker because there isn't
yet a way of handling proxy objects in type hints.

We already do this in every other case, for example:
https://github.com/alphagov/notifications-admin/blob/e502b06e0947aef2174c073bdf1b3c8950f799da/app/extensions.py#L21
@quis
quis requested a review from risicle September 15, 2026 15:43
@quis quis changed the title Add missing # ignore when using LocalProxy` Add missing # ignore when using LocalProxy Sep 15, 2026
@quis quis changed the title Add missing # ignore when using LocalProxy Add missing # type: ignore when using LocalProxy Sep 15, 2026
@quis
quis merged commit 3ad2b04 into main Sep 21, 2026
8 checks passed
@quis
quis deleted the add-missing-ignore-localproxy branch September 21, 2026 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants