Skip to content

Conversation

@migeed-z
Copy link
Contributor

Summary: copy of existing diff to rerun github actions

Differential Revision: D90557176

…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
@meta-codesync
Copy link

meta-codesync bot commented Jan 13, 2026

@migeed-z has exported this pull request. If you are a Meta employee, you can view the originating Diff in D90557176.

@migeed-z migeed-z changed the title test reverse relations [NOCOMMIT]test reverse relations Jan 13, 2026
@github-actions
Copy link

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`

@migeed-z migeed-z closed this Jan 13, 2026
@migeed-z migeed-z deleted the export-D90557176 branch January 13, 2026 05:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant