Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[ty] Avoid panicking on __new__ assigned to classes#25282

Merged
charliermarsh merged 1 commit into
mainfrom
charlie/constructor
May 21, 2026
Merged

[ty] Avoid panicking on __new__ assigned to classes#25282
charliermarsh merged 1 commit into
mainfrom
charlie/constructor

Conversation

@charliermarsh

@charliermarsh charliermarsh commented May 20, 2026

Copy link
Copy Markdown
Member

Summary

I added a TODO since I don't think this is worth modeling properly, but we also shouldn't panic on it. I've tried to clearly outline the actual runtime behavior in the mdtests, though it's extremely mind-bending IMO.

Closes astral-sh/ty#3491.

@astral-sh-bot astral-sh-bot Bot added the ty Multi-file analysis & type inference label May 20, 2026
@astral-sh-bot

astral-sh-bot Bot commented May 20, 2026

Copy link
Copy Markdown

Typing conformance results

No changes detected ✅

Current numbers
The percentage of diagnostics emitted that were expected errors held steady at 89.36%. The percentage of expected errors that received a diagnostic held steady at 85.49%. The number of fully passing files held steady at 88/134.

@charliermarsh charliermarsh force-pushed the charlie/constructor branch from 0ee18e1 to a1710e2 Compare May 20, 2026 21:26
@astral-sh-bot

astral-sh-bot Bot commented May 20, 2026

Copy link
Copy Markdown

Memory usage report

Memory usage unchanged ✅

@charliermarsh charliermarsh force-pushed the charlie/constructor branch from a1710e2 to 8cef151 Compare May 20, 2026 21:32
@charliermarsh charliermarsh marked this pull request as ready for review May 20, 2026 21:33
@charliermarsh charliermarsh added the bug Something isn't working label May 20, 2026
@charliermarsh charliermarsh assigned carljm and unassigned dcreager May 20, 2026
@astral-sh-bot

astral-sh-bot Bot commented May 20, 2026

Copy link
Copy Markdown

ecosystem-analyzer results

No diagnostic changes detected ✅

Full report with detailed diff (timing results)

@charliermarsh charliermarsh force-pushed the charlie/constructor branch from 8cef151 to 69b3366 Compare May 21, 2026 08:40

@carljm carljm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you!

@charliermarsh charliermarsh merged commit 54ffc23 into main May 21, 2026
60 checks passed
@charliermarsh charliermarsh deleted the charlie/constructor branch May 21, 2026 14:30
thejchap pushed a commit to thejchap/ruff that referenced this pull request May 23, 2026
## Summary

I added a TODO since I don't think this is worth modeling properly, but
we also shouldn't panic on it. I've tried to clearly outline the actual
runtime behavior in the mdtests, though it's extremely mind-bending IMO.

Closes astral-sh/ty#3491.
anishgirianish pushed a commit to anishgirianish/ruff that referenced this pull request May 28, 2026
## Summary

I added a TODO since I don't think this is worth modeling properly, but
we also shouldn't panic on it. I've tried to clearly outline the actual
runtime behavior in the mdtests, though it's extremely mind-bending IMO.

Closes astral-sh/ty#3491.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

panic: map should not be used on a ConstructorBinding with downstream constructor

3 participants