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
type[Self] converted to a callable drops constructor signature #5591
When a variable declared type[Self] (such as the cls parameter of a classmethod) is used where a callable is expected, pyrefly treats it as type.__call__ instead of using the constructor of the class bound to Self.
Activity
crypt0lith commentedon Nov 9, 2026
#claim
The fix would be adding a new arm for
SelfTypeafter the existing one:pyrefly/pyrefly/lib/solver/subset.rs
Lines 2594 to 2596 in 7431fb0
github-actions commentedon Nov 9, 2026
@crypt0lith you've claimed this issue — it's now assigned to you. Thanks for picking it up! 🎉
shahhamdihassan commentedon Nov 9, 2026
Thanks for the report, this reproduces on the latest release and on main: sandbox
@crypt0lith thanks for picking it up!
Convert type[Self] to callable from class constructor
Convert type[Self] to callable from class constructor (meta#5592)