facebook / facebook/pyrefly

feature request: experimental support for PEP 767 (`typing.ReadOnly` for attributes)

Open
#4,558 3 comments 2 reactions 1 assignee Claimed by @rchen152 View on GitHub
stale typechecking
Dominant language
Rust
Stars
7k
Forks
516
PR merge metrics
No merged PRs in 30d

Description

### Describe the Bug

https://peps.python.org/pep-0767/ fills a very annoying gap in the python typing system (covariance for attributes that are only read but not written to)

This PEP has a lot of support and is likely to be accepted once finished, but one of the pre-conditions is proof-of-concept support by one or more type checkers.

### Sandbox Link

_No response_

### (Only applicable for extension issues) IDE Information

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.