-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[ty] synthesize __replace__ for dataclasses (>=3.13)
#19545
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
4cede2a to
168599f
Compare
__replace__ for dataclasses (>=3.13)
|
Thank you for working on this!! Hmm, I'm not sure we need to implement special casing for any of these. Typeshed should already include |
168599f to
9a743a2
Compare
|
@AlexWaygood ready for some feedback on this one! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice — thank you. I added a couple of minor inline comments.
9a743a2 to
6ed4a25
Compare
Diagnostic diff on typing conformance testsNo changes detected when running ty on typing conformance tests ✅ |
36d67e1 to
e851706
Compare
e851706 to
2861d0b
Compare
6639db6 to
646685c
Compare
646685c to
e8a283a
Compare
|
@sharkdp thanks - i pulled out the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much. I made a few minor adjustments.
* main: (24 commits) Add `Checker::context` method, deduplicate Unicode checks (#19609) [`flake8-pyi`] Preserve inline comment in ellipsis removal (`PYI013`) (#19399) [ty] Add flow diagram for import resolution [ty] Add comments to some core resolver functions [ty] Add missing ticks and use consistent quoting [ty] Reflow some long lines [ty] Unexport helper function [ty] Remove offset from `CompletionTargetTokens::Unknown` [`pyupgrade`] Fix `UP030` to avoid modifying double curly braces in format strings (#19378) [ty] fix a typo (#19621) [ty] synthesize `__replace__` for dataclasses (>=3.13) (#19545) [ty] Discard `Definition`s when normalizing `Signature`s (#19615) [ty] Fix empty spans following a line terminator and unprintable character spans in diagnostics (#19535) Add `LinterContext::settings` to avoid passing separate settings (#19608) Support `.pyi` files in ruff analyze graph (#19611) [ty] Sync vendored typeshed stubs (#19607) [ty] Bump docstring-adder pin (#19606) [`perflint`] Ignore rule if target is `global` or `nonlocal` (`PERF401`) (#19539) Add license classifier back to pyproject.toml (#19599) [ty] Add stub mapping support to signature help (#19570) ...
Summary
astral-sh/ty#111
adds support for the new
copy.replaceand__replace__protocol added in 3.13Burndown
__replace__Test Plan
new mdtests