-
Notifications
You must be signed in to change notification settings - Fork 246
[NOCOMMIT]test reverse relations #2092
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
Closed
Closed
+538
−52
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…rd) (facebook#2087) Summary: Here, we test the related_name keyword which allows us to customize the reverse relation Reviewed By: aleivag Differential Revision: D90517278
Summary: We can use the "+" symbol to avoid creating a reverse relation. This is important to test so we can make sure we are avoiding creating that field if it is not needed Reviewed By: aleivag, yangdanny97 Differential Revision: D90517596
…book#2089) Summary: Pull Request resolved: facebook#2089 Reviewed By: yangdanny97 Differential Revision: D90517772
Summary: We are documenting this for coverage, but this will not be covered by the initial implementation. I do believe that this is an important case to consider though. I would expect a lot of the reverse relations would be spread across multiple modules. It's good that we can support them per module, but a complete implementation would support cross module as well. Reviewed By: stroxler Differential Revision: D90518264
Summary: Those are some final corner cases before I followup with the full implementation Differential Revision: D90521591
Summary: copy of existing diff to rerun github actions Differential Revision: D90557176
|
Diff from mypy_primer, showing the effect of this PR on open source code: zulip (https://github.com/zulip/zulip)
- ERROR corporate/views/support.py:943:13-42: Object of class `RemoteZulipServer` has no attribute `remoterealm_set` [missing-attribute]
- ERROR zerver/actions/uploads.py:136:44-66: Object of class `Message` has no attribute `attachment_set`
+ ERROR zerver/actions/uploads.py:136:44-66: Object of class `ScheduledMessage` has no attribute `attachment_set` [missing-attribute]
- Object of class `ScheduledMessage` has no attribute `attachment_set` [missing-attribute]
- ERROR zerver/actions/uploads.py:145:9-31: Object of class `Message` has no attribute `attachment_set`
+ ERROR zerver/actions/uploads.py:145:9-31: Object of class `ScheduledMessage` has no attribute `attachment_set` [missing-attribute]
- Object of class `ScheduledMessage` has no attribute `attachment_set` [missing-attribute]
- ERROR zerver/actions/uploads.py:157:35-57: Object of class `Message` has no attribute `attachment_set`
+ ERROR zerver/actions/uploads.py:157:35-57: Object of class `ScheduledMessage` has no attribute `attachment_set` [missing-attribute]
- Object of class `ScheduledMessage` has no attribute `attachment_set` [missing-attribute]
- ERROR zerver/lib/widget.py:142:12-34: Object of class `Message` has no attribute `submessage_set` [missing-attribute]
- ERROR zerver/management/commands/export_search.py:300:35-57: Object of class `Message` has no attribute `attachment_set` [missing-attribute]
- ERROR zerver/models/realms.py:1375:17-38: Object of class `Realm` has no attribute `realmdomain_set` [missing-attribute]
+ ERROR zerver/models/realms.py:1375:16-76: No matching overload found for function `list.__init__` called with arguments: (QuerySet[RealmDomain, dict[str, Any]]) [no-matching-overload]
- ERROR zerver/tests/test_message_fetch.py:5655:25-43: Object of class `Message` has no attribute `attachment_set` [missing-attribute]
- ERROR zerver/tests/test_message_fetch.py:5656:26-44: Object of class `Message` has no attribute `attachment_set` [missing-attribute]
- ERROR zerver/tests/test_message_fetch.py:5660:25-43: Object of class `Message` has no attribute `attachment_set` [missing-attribute]
- ERROR zerver/tests/test_message_fetch.py:5661:26-44: Object of class `Message` has no attribute `attachment_set` [missing-attribute]
- ERROR zerver/tests/test_message_fetch.py:5665:26-44: Object of class `Message` has no attribute `attachment_set` [missing-attribute]
- ::error file=corporate/views/support.py,line=943,col=13,endLine=943,endColumn=42,title=Pyrefly missing-attribute::Object of class `RemoteZulipServer` has no attribute `remoterealm_set`
- ::error file=zerver/actions/uploads.py,line=136,col=44,endLine=136,endColumn=66,title=Pyrefly missing-attribute::Object of class `Message` has no attribute `attachment_set`%0AObject of class `ScheduledMessage` has no attribute `attachment_set`
+ ::error file=zerver/actions/uploads.py,line=136,col=44,endLine=136,endColumn=66,title=Pyrefly missing-attribute::Object of class `ScheduledMessage` has no attribute `attachment_set`
- ::error file=zerver/actions/uploads.py,line=145,col=9,endLine=145,endColumn=31,title=Pyrefly missing-attribute::Object of class `Message` has no attribute `attachment_set`%0AObject of class `ScheduledMessage` has no attribute `attachment_set`
+ ::error file=zerver/actions/uploads.py,line=145,col=9,endLine=145,endColumn=31,title=Pyrefly missing-attribute::Object of class `ScheduledMessage` has no attribute `attachment_set`
- ::error file=zerver/actions/uploads.py,line=157,col=35,endLine=157,endColumn=57,title=Pyrefly missing-attribute::Object of class `Message` has no attribute `attachment_set`%0AObject of class `ScheduledMessage` has no attribute `attachment_set`
+ ::error file=zerver/actions/uploads.py,line=157,col=35,endLine=157,endColumn=57,title=Pyrefly missing-attribute::Object of class `ScheduledMessage` has no attribute `attachment_set`
- ::error file=zerver/lib/widget.py,line=142,col=12,endLine=142,endColumn=34,title=Pyrefly missing-attribute::Object of class `Message` has no attribute `submessage_set`
- ::error file=zerver/management/commands/export_search.py,line=300,col=35,endLine=300,endColumn=57,title=Pyrefly missing-attribute::Object of class `Message` has no attribute `attachment_set`
- ::error file=zerver/models/realms.py,line=1375,col=17,endLine=1375,endColumn=38,title=Pyrefly missing-attribute::Object of class `Realm` has no attribute `realmdomain_set`
+ ::error file=zerver/models/realms.py,line=1375,col=16,endLine=1375,endColumn=76,title=Pyrefly no-matching-overload::No matching overload found for function `list.__init__` called with arguments: (QuerySet[RealmDomain, dict[str, Any]])%0A Possible overloads:%0A () -> None%0A (iterable: Iterable[RealmDomainDict], /) -> None [closest match]
- ::error file=zerver/tests/test_message_fetch.py,line=5655,col=25,endLine=5655,endColumn=43,title=Pyrefly missing-attribute::Object of class `Message` has no attribute `attachment_set`
- ::error file=zerver/tests/test_message_fetch.py,line=5656,col=26,endLine=5656,endColumn=44,title=Pyrefly missing-attribute::Object of class `Message` has no attribute `attachment_set`
- ::error file=zerver/tests/test_message_fetch.py,line=5660,col=25,endLine=5660,endColumn=43,title=Pyrefly missing-attribute::Object of class `Message` has no attribute `attachment_set`
- ::error file=zerver/tests/test_message_fetch.py,line=5661,col=26,endLine=5661,endColumn=44,title=Pyrefly missing-attribute::Object of class `Message` has no attribute `attachment_set`
- ::error file=zerver/tests/test_message_fetch.py,line=5665,col=26,endLine=5665,endColumn=44,title=Pyrefly missing-attribute::Object of class `Message` has no attribute `attachment_set`
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary: copy of existing diff to rerun github actions
Differential Revision: D90557176