[ty] Rename "possibly unbound" diagnostics to "possibly missing" (#20492)

Co-authored-by: Alex Waygood <alex.waygood@gmail.com>
This commit is contained in:
Renkai Ge 2025-09-23 22:26:55 +08:00 committed by GitHub
parent 4ed8c65d29
commit bf38e69870
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
41 changed files with 213 additions and 194 deletions

View file

@ -69,7 +69,7 @@ instance = C()
instance.non_existent = 1 # error: [unresolved-attribute]
```
## Possibly-unbound attributes
## Possibly-missing attributes
When trying to set an attribute that is not defined in all branches, we emit errors:
@ -79,10 +79,10 @@ def _(flag: bool) -> None:
if flag:
attr: int = 0
C.attr = 1 # error: [possibly-unbound-attribute]
C.attr = 1 # error: [possibly-missing-attribute]
instance = C()
instance.attr = 1 # error: [possibly-unbound-attribute]
instance.attr = 1 # error: [possibly-missing-attribute]
```
## Data descriptors