Conversation

sobolevn

TypedDict mangles private names as regular Python classes do. So, __schema name will become _IntrospectionQuery__schema instead. But, inline definition will preserve a correct name for the field. See python/cpython#129567

Found during python/mypy#16715

`TypedDict` mangles private names as regular Python classes do. So, `__schema` name will become `_IntrospectionQuery__schema` instead.
See python/cpython#129567

Found during python/mypy#16715
@sobolevnsobolevn requested a review from Cito as a code owner February 16, 2025 21:49
@Cito

Thanks for reporting and the PR. Is this also a problem with current mypy versions? If yes, how can I provoke a typing error there?

@sobolevn

Not until python/mypy#16715 is merged

@codspeed-hqCodSpeed HQ

CodSpeed Performance Report

Merging #234 will not alter performance

Comparing sobolevn:-1 (e5d09fa) with main (44334f3)

Summary

✅ 14 untouched benchmarks

@Cito

Looks good, but you need to silence the linter with # noqa: UP013 because it prefers class syntax, and add a small comment as explanation why we deviate from the class syntax here.

@Cito

Now there are only mypy issues, probably because mypy has been updated and not related to this PR. Will fix them separately.

@CitoCito merged commit dae8e8f into graphql-python:main Feb 17, 2025
11 of 12 checks passed
@CitoCito removed their request for review February 17, 2025 20:01
Sign up for free to join this conversation on . Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.