You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
False uninitialized-instance-variable for str slots initialized in __new__ #5280
The annotated slot is assigned before __new__ returns, and every normal construction supplies the required metadata. Reading Label("text", flag=True).flag succeeds. Pyrefly 1.4.0 still reports uninitialized-instance-variable; 1.3.2 accepts it under the same all-rules preset. This also prevents replacing factory-initialized string metadata with the standard __new__ pattern while adopting the new check.
Reproduced with Pyrefly 1.4.0 and CPython 3.14.8 on macOS. Pyrefly 1.3.2 accepts this example with the same configuration. Mypy 2.4.0 (strict, without project plugins) and Pyright 1.1.414 also accept it.
Activity