Skip to content

fix Unable to see generic attributes on abstract classes #4058#4061

Open
asukaminato0721 wants to merge 1 commit into
facebook:mainfrom
asukaminato0721:4058
Open

fix Unable to see generic attributes on abstract classes #4058#4061
asukaminato0721 wants to merge 1 commit into
facebook:mainfrom
asukaminato0721:4058

Conversation

@asukaminato0721

@asukaminato0721 asukaminato0721 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #4058

generic class attributes remain visible when accessed through type[Self@...], which is the cls receiver in classmethods.

Bare class access like C.x still keeps the existing missing-attribute behavior.

Test Plan

add test

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

Diff from mypy_primer, showing the effect of this PR on open source code:

steam.py (https://github.com/Gobot1234/steam.py)
- ERROR steam/ext/commands/converters.py:239:13-30: Generic attribute `converter_for` of class `Converter` is not visible on the class [no-access]

prefect (https://github.com/PrefectHQ/prefect)
- ERROR src/prefect/workers/base.py:753:12-43: Generic attribute `job_configuration_variables` of class `BaseWorker` is not visible on the class [missing-attribute]
- ERROR src/prefect/workers/base.py:754:22-43: Generic attribute `job_configuration` of class `BaseWorker` is not visible on the class [missing-attribute]
- ERROR src/prefect/workers/base.py:762:32-81: Object of class `object` has no attribute `model_json_schema` [missing-attribute]
- ERROR src/prefect/workers/base.py:765:34-55: Generic attribute `job_configuration` of class `BaseWorker` is not visible on the class [missing-attribute]

static-frame (https://github.com/static-frame/static-frame)
- ERROR static_frame/core/store_zip.py:386:16-39: Generic attribute `_STORE_CONFIG_CLASS` of class `_StoreZipDelimited` is not visible on the class [missing-attribute]

artigraph (https://github.com/artigraph/artigraph)
- ERROR src/arti/internal/mappings.py:246:53-72: Generic attribute `__target_type__` of class `TypedBox` is not visible on the class [missing-attribute]
- ERROR src/arti/internal/mappings.py:253:64-83: Generic attribute `__target_type__` of class `TypedBox` is not visible on the class [missing-attribute]
- ERROR src/arti/storage/__init__.py:90:9-40: Generic attribute `storage_partition_type` of class `Storage` is not visible on the class [no-access]
- ERROR src/arti/storage/__init__.py:105:31-57: Generic attribute `storage_partition_type` of class `Storage` is not visible on the class [missing-attribute]
- ERROR src/arti/storage/__init__.py:115:53-79: Generic attribute `storage_partition_type` of class `Storage` is not visible on the class [missing-attribute]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to see generic attributes on abstract classes

1 participant