mirror of
https://github.com/astral-sh/ruff.git
synced 2025-11-02 04:48:07 +00:00
[ty] Rename "possibly unbound" diagnostics to "possibly missing" (#20492)
Co-authored-by: Alex Waygood <alex.waygood@gmail.com>
This commit is contained in:
parent
4ed8c65d29
commit
bf38e69870
41 changed files with 213 additions and 194 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue