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
attrs.field(converter=None) makes field type Unknown instead of keeping the annotation #5283
When an attrs field is annotated (e.g. x: int) and converter=None is passed explicitly, Pyrefly treats the field / synthesized __init__ parameter as Unknown instead of int.
Expected behavior:
converter=None means “no converter” (same as omitting converter, default argument), so the init parameter should still be typed from the field annotation (int).
Minimal Repro
fromattrsimportdefine, field@defineclassA:
x: int=field(converter=None)
p=A("asd") # should be a type error; currently accepted (field typed as Unknown)
Activity