Ban subclassing dataclasses with order=True#3804
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
82ea78a to
5b3c20f
Compare
|
@yangdanny97 Made the changes we discussed! Please let me know if all looks okay |
7e1ea88 to
08f1344
Compare
|
@yangdanny97 has imported this pull request. If you are a Meta employee, you can view this in D109264971. |
|
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅ |
08f1344 to
a73dbf6
Compare
|
I think linter was failing to due to me not running cargo fmt after some previous changes, I've run the fmt and pushed changes. Should be good now hopefully. Sorry about this! |
stroxler
left a comment
There was a problem hiding this comment.
Review automatically exported from Phabricator review in Meta.
|
This pull request has been automatically marked as stale because it has not had recent activity for more than 2 weeks. If you are still working on this this pull request, please add a comment or push new commits to keep it active. Otherwise, please unassign yourself and allow someone else to take over. Thank you for your contributions! |
a73dbf6 to
c2afe8d
Compare
Feat: add stlib origin flag in Dataclass Metadata Feat: only raise inheritance warning when subclassing ordered dataclass Add tests to confirm ordered dataclass behaviour Update docs with new errorkind
c2afe8d to
8d500fa
Compare
Summary
Adds an
invalid-inheritanceerror when a class subclasses a dataclass that hasorder=True.Fixes #3762
Test Plan
Added test
test_parent_dataclass_with_orderto confirm behaviour