Skip to content

fix Django: infer row types for values() and values_list() #5735 - #5835

Open
asukaminato0721 wants to merge 1 commit into
pyrefly-org:mainfrom
asukaminato0721:5735
Open

asukaminato0721 wants to merge 1 commit into
pyrefly-org:mainfrom
asukaminato0721:5735

Conversation

@asukaminato0721

Copy link
Copy Markdown
Collaborator

Summary

Fixes #5735

infers Django query row types from literal field names:
values("name", "price") produces a TypedDict with typed keys.
values_list("name", "price") produces tuple[str, Decimal].
values_list("price", flat=True) produces Decimal.
named=True adds typed attributes and preserves tuple indexing and unpacking.

  • I am a human, and I fully understand the code I am submitting.

Test Plan

add test

@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown

✅ This PR meets all requirements from our pull request checklist.

Optional recommendations:

  • This PR is very large, which makes it slow and difficult to review. We strongly recommend splitting it into smaller PRs that can be merged independently. If that isn't possible, please structure it as a series of small commits. If you've already split it as far as is practical, no action is needed.

Note: this comment updates automatically after changes to the PR. Updates may take up to half an hour.

@meta-codesync

meta-codesync Bot commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

This pull request has been imported. If you are a Meta employee, you can view this in D135541033. (Because this pull request was imported automatically, there will not be any future comments.)

@github-actions

This comment has been minimized.

@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown

Diff from mypy_primer, showing the effect of this PR on open source code:

============================================================
SUMMARY
============================================================
Total: +43 new errors, -236 fixed errors
By preset: +11/-9 (default), +11/-9 (strict)

Projects with changes (1):
  zulip: +43 -236
============================================================

FULL DIFF DETAILS
------------------------------------------------------------

zulip (https://github.com/zulip/zulip)
- ERROR analytics/lib/counts.py:560:9-16: The type of `user_id` is an explicit `Any` [explicit-any-use]
- ERROR analytics/lib/counts.py:560:18-26: The type of `realm_id` is an explicit `Any` [explicit-any-use]
- ERROR analytics/lib/counts.py:560:28-42: The type of `interval_start` is an explicit `Any` [explicit-any-use]
- ERROR analytics/lib/counts.py:560:44-56: The type of `interval_end` is an explicit `Any` [explicit-any-use]
- ERROR analytics/lib/counts.py:562:37-51: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR analytics/lib/counts.py:563:33-45: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR analytics/views/stats.py:404:28-30: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR analytics/views/stats.py:404:42-44: The type of `id` is an explicit `Any` [explicit-any-use]
- ERROR analytics/views/stats.py:404:46-50: The type of `name` is an explicit `Any` [explicit-any-use]
- ERROR analytics/views/stats.py:637:9-17: The type of `subgroup` is an explicit `Any` [explicit-any-use]
- ERROR analytics/views/stats.py:637:19-27: The type of `end_time` is an explicit `Any` [explicit-any-use]
- ERROR analytics/views/stats.py:637:29-34: The type of `value` is an explicit `Any` [explicit-any-use]
- ERROR analytics/views/stats.py:638:21-29: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR analytics/views/stats.py:638:31-39: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR analytics/views/stats.py:638:43-48: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR corporate/tests/test_stripe.py:218:26-49: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR corporate/tests/test_stripe.py:335:26-49: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR corporate/tests/test_stripe.py:455:26-49: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR corporate/tests/test_stripe.py:583:26-49: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR corporate/tests/test_stripe.py:694:30-53: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR corporate/tests/test_stripe.py:888:30-53: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR corporate/tests/test_stripe.py:1161:30-53: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR corporate/tests/test_stripe.py:1342:30-53: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR corporate/tests/test_stripe.py:2518:13-2520:17: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR corporate/tests/test_stripe.py:2525:13-2527:17: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR corporate/tests/test_stripe.py:2690:13-2692:17: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR corporate/tests/test_stripe.py:2844:13-2846:17: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR corporate/tests/test_stripe.py:2851:13-2853:17: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR corporate/views/support.py:697:16-701:10: Returning implicit Any from function declared to return "str" [no-any-return-implicit]
- ERROR corporate/views/support.py:704:16-708:10: Returning implicit Any from function declared to return "str" [no-any-return-implicit]
- ERROR corporate/views/support.py:983:16-987:10: Returning implicit Any from function declared to return "str" [no-any-return-implicit]
- ERROR corporate/views/support.py:990:16-994:10: Returning implicit Any from function declared to return "str" [no-any-return-implicit]
- ERROR zerver/actions/create_user.py:277:20-30: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/actions/create_user.py:281:18-28: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/actions/message_edit.py:1092:13-20: The type of `user_id` is an explicit `Any` [explicit-any-use]
- ERROR zerver/actions/message_edit.py:1093:13-22: The type of `stream_id` is an explicit `Any` [explicit-any-use]
- ERROR zerver/actions/message_edit.py:1094:13-23: The type of `sub_active` is an explicit `Any` [explicit-any-use]
- ERROR zerver/actions/message_edit.py:1095:13-27: The type of `is_user_active` is an explicit `Any` [explicit-any-use]
- ERROR zerver/actions/message_edit.py:1096:13-32: The type of `user_long_term_idle` is an explicit `Any` [explicit-any-use]
- ERROR zerver/actions/message_edit.py:1097:13-22: The type of `user_role` is an explicit `Any` [explicit-any-use]
- ERROR zerver/actions/message_edit.py:1107:36-43: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/actions/message_edit.py:1110:45-52: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/actions/message_edit.py:1112:53-60: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/actions/message_edit.py:1115:52-59: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/actions/message_edit.py:1118:49-56: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/actions/message_edit.py:1120:52-59: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/actions/message_edit.py:1674:17-24: The type of `message` is an explicit `Any` [explicit-any-use]
- ERROR zerver/actions/message_flags.py:333:32-39: The type of `message` is an explicit `Any` [explicit-any-use]
- ERROR zerver/actions/message_flags.py:337:33-40: The type of `message` is an explicit `Any` [explicit-any-use]
- ERROR zerver/actions/message_send.py:430:40-62: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/actions/message_send.py:454:21-36: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/actions/message_send.py:456:25-47: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/actions/message_send.py:458:21-33: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/actions/message_send.py:459:21-38: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/actions/message_send.py:485:21-43: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/actions/message_send.py:561:10-18: Implicit conversion of `set[int | Any] | set[int]` to `bool` is not allowed [implicit-bool]
+ ERROR zerver/actions/message_send.py:561:10-18: Implicit conversion of `set[int]` to `bool` is not allowed [implicit-bool]
- ERROR zerver/actions/streams.py:379:20-25: The type of attribute `lower` is an explicit `Any` [explicit-any-use]
- ERROR zerver/actions/streams.py:380:13-23: The type of `topic_name` is an explicit `Any` [explicit-any-use]
- ERROR zerver/actions/streams.py:384:9-19: The type of `topic_name` is an explicit `Any` [explicit-any-use]
- ERROR zerver/actions/streams.py:386:45-55: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/actions/streams.py:391:13-39: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/actions/streams.py:393:13-41: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/actions/uploads.py:95:13-20: The type of `path_id` is an explicit `Any` [explicit-any-use]
- ERROR zerver/actions/uploads.py:100:24-31: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/actions/uploads.py:104:13-20: The type of `path_id` is an explicit `Any` [explicit-any-use]
- ERROR zerver/actions/uploads.py:109:24-31: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/actions/user_groups.py:141:35-145:10: `list[dict[str, Any]]` is not assignable to variable `full_member_group_users` with type `list[MemberGroupUserDict]` [bad-assignment]
- ERROR zerver/actions/user_groups.py:146:30-150:10: `list[dict[str, Any]]` is not assignable to variable `member_group_users` with type `list[MemberGroupUserDict]` [bad-assignment]
- ERROR zerver/actions/user_groups.py:152:35-154:10: `list[dict[str, Any]]` is not assignable to variable `full_member_group_users` with type `list[MemberGroupUserDict]` [bad-assignment]
- ERROR zerver/actions/user_groups.py:155:30-157:10: `list[dict[str, Any]]` is not assignable to variable `member_group_users` with type `list[MemberGroupUserDict]` [bad-assignment]
- ERROR zerver/actions/users.py:337:9-22: The type of `user_group_id` is an explicit `Any` [explicit-any-use]
- ERROR zerver/actions/users.py:337:24-39: The type of `user_profile_id` is an explicit `Any` [explicit-any-use]
- ERROR zerver/actions/users.py:338:23-36: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/actions/users.py:338:45-60: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/actions/users.py:341:9-20: The type of `subgroup_id` is an explicit `Any` [explicit-any-use]
- ERROR zerver/actions/users.py:341:22-35: The type of `supergroup_id` is an explicit `Any` [explicit-any-use]
- ERROR zerver/actions/users.py:342:25-38: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/actions/users.py:342:47-58: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/actions/users.py:421:9-23: The type of `recipient_type` is an explicit `Any` [explicit-any-use]
- ERROR zerver/actions/users.py:421:25-32: The type of `user_id` is an explicit `Any` [explicit-any-use]
- ERROR zerver/actions/users.py:423:55-62: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/actions/users.py:425:41-48: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/actions/users.py:430:8-45: Implicit conversion of `set[int | Any]` to `bool` is not allowed [implicit-bool]
+ ERROR zerver/actions/users.py:430:8-45: Implicit conversion of `set[int]` to `bool` is not allowed [implicit-bool]
- ERROR zerver/actions/users.py:471:8-47: Implicit conversion of `set[Any]` to `bool` is not allowed [implicit-bool]
+ ERROR zerver/actions/users.py:471:8-47: Implicit conversion of `set[int]` to `bool` is not allowed [implicit-bool]
- ERROR zerver/lib/alert_words.py:23:40-70: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/alert_words.py:24:29-59: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/alert_words.py:24:68-87: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/bulk_create.py:170:14-19: The type of attribute `lower` is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/bulk_create.py:170:26-30: The type of `name` is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/bulk_create.py:205:19-39: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/bulk_create.py:207:12-34: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/bulk_create.py:207:27-32: The type of attribute `lower` is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/cache.py:637:41-44: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/cache.py:637:50-53: The type of `rid` is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/digest.py:385:13-35: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/digest.py:385:41-66: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/digest.py:400:13-35: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/digest.py:400:78-83: The type of attribute `lower` is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/display_recipient.py:111:16-87: Returned type `QuerySet[Stream, dict[str, Any]]` is not assignable to declared return type `QuerySet[Stream, TinyStreamResult]` [bad-return]
+ ERROR zerver/lib/display_recipient.py:111:16-87: Returned type `QuerySet[Stream, dict[str, int | str | None]]` is not assignable to declared return type `QuerySet[Stream, TinyStreamResult]` [bad-return]
- ERROR zerver/lib/email_mirror.py:534:25-42: The type of `recipient_str` is unknown; it is inferred as an implicit `Any` [unknown-variable-type]
- ERROR zerver/lib/email_mirror.py:542:9-22: The type of this argument is partially unknown; it contains an implicit `Any` [partially-unknown-type]
- ERROR zerver/lib/export.py:2957:20-34: Returning Any from function declared to return "str" [no-any-return-explicit]
+ ERROR zerver/lib/mention.py:213:21-40: Argument `int | None` is not assignable to parameter `recipient_id` with type `int` in function `ChannelInfo.__init__` [bad-argument-type]
- ERROR zerver/lib/mention.py:211:35-46: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/mention.py:212:21-30: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/mention.py:213:21-40: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/mention.py:214:21-57: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/mention.py:215:21-41: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/mention.py:217:24-35: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/mention.py:217:39-48: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/message.py:1418:13-37: The type of `first_visible_message_id` is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/message.py:1432:17-41: The type of `first_visible_message_id` is an explicit `Any` [explicit-any-use]
+ ERROR zerver/lib/message.py:1474:12-1481:6: Returned type `list[tuple[int, int | None]]` is not assignable to declared return type `list[tuple[int, int]]` [bad-return]
- ERROR zerver/lib/message.py:1501:9-21: The type of `recipient_id` is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/message.py:1501:23-38: The type of `user_profile_id` is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/message.py:1502:23-35: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/message.py:1502:44-59: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/message_cache.py:550:47-79: Argument `dict[Any, dict[str, Any]]` is not assignable to parameter `sender_dict` with type `Mapping[int, SenderInfoRow]` in function `MessageDict.hydrate_sender_info` [bad-argument-type]
+ ERROR zerver/lib/message_cache.py:550:47-79: Argument `dict[int, dict[str, bool | int | str]]` is not assignable to parameter `sender_dict` with type `Mapping[int, SenderInfoRow]` in function `MessageDict.hydrate_sender_info` [bad-argument-type]
- ERROR zerver/lib/muted_users.py:17:13-36: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/muted_users.py:18:64-81: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/narrow.py:1006:8-32: Implicit conversion of `list[Any] | list[Unknown]` to `bool` is not allowed [implicit-bool]
+ ERROR zerver/lib/narrow.py:1006:8-32: Implicit conversion of `list[int] | list[Unknown]` to `bool` is not allowed [implicit-bool]
- ERROR zerver/lib/narrow.py:1147:12-18: Returning Any from function declared to return "int" [no-any-return-explicit]
- ERROR zerver/lib/narrow.py:1175:20-31: Returning Any from function declared to return "int | None" [no-any-return-explicit]
- ERROR zerver/lib/presence.py:216:8-21: Implicit conversion of `list[dict[str, Any]]` to `bool` is not allowed [implicit-bool]
+ ERROR zerver/lib/presence.py:216:8-21: Implicit conversion of `list[dict[str, bool | datetime | int | str | None]]` to `bool` is not allowed [implicit-bool]
+ ERROR zerver/lib/retention.py:434:9-443:61: The type of `query` is partially unknown; it contains an implicit `Any` [partially-unknown-type]
+ ERROR zerver/lib/retention.py:458:36-54: Cannot set item in `dict[tuple[int, str | None], list[int]]` [unsupported-operation]
- ERROR zerver/lib/retention.py:455:9-21: The type of `recipient_id` is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/retention.py:456:9-14: The type of `topic` is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/retention.py:458:36-54: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/send_email.py:542:12-20: Implicit conversion of `list[Any]` to `bool` is not allowed [implicit-bool]
+ ERROR zerver/lib/send_email.py:542:12-20: Implicit conversion of `list[int]` to `bool` is not allowed [implicit-bool]
- ERROR zerver/lib/send_email.py:573:12-20: Implicit conversion of `list[Any]` to `bool` is not allowed [implicit-bool]
+ ERROR zerver/lib/send_email.py:573:12-20: Implicit conversion of `list[int]` to `bool` is not allowed [implicit-bool]
- ERROR zerver/lib/send_email.py:584:8-16: Implicit conversion of `list[Any]` to `bool` is not allowed [implicit-bool]
+ ERROR zerver/lib/send_email.py:584:8-16: Implicit conversion of `list[int]` to `bool` is not allowed [implicit-bool]
+ ERROR zerver/lib/send_email.py:760:13-767:24: The type of `already_sent_emails` is partially unknown; it contains an implicit `Any` [partially-unknown-type]
+ ERROR zerver/lib/send_email.py:767:14-22: The type of attribute `distinct` is partially unknown; it contains an implicit `Any` [partially-unknown-type]
+ ERROR zerver/lib/send_email.py:767:22-24: The type of this argument is partially unknown; it contains an implicit `Any` [partially-unknown-type]
+ ERROR zerver/lib/send_email.py:770:50-55: The type of attribute `count` is partially unknown; it contains an implicit `Any` [partially-unknown-type]
+ ERROR zerver/lib/send_email.py:770:55-57: The type of this argument is partially unknown; it contains an implicit `Any` [partially-unknown-type]
+ ERROR zerver/lib/send_email.py:773:22-57: The type of this argument is partially unknown; it contains an implicit `Any` [partially-unknown-type]
- ERROR zerver/lib/soft_deactivation.py:196:65-90: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/soft_deactivation.py:206:30-49: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/soft_deactivation.py:230:25-50: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/soft_deactivation.py:231:32-44: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/soft_deactivation.py:231:46-90: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/soft_deactivation.py:390:54-58: The type of attribute `days` is an explicit `Any` [explicit-any-use]
+ ERROR zerver/lib/soft_deactivation.py:390:13-52: `-` is not supported between `datetime` and `None` [unsupported-operation]
- ERROR zerver/lib/stream_subscription.py:107:16-38: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/stream_subscription.py:107:44-56: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/stream_topic.py:36:42-64: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/stream_topic.py:36:68-92: The type of this argument is an explicit `Any` [explicit-any-use]
+ ERROR zerver/lib/stream_traffic.py:31:12-24: Returned type `dict[int, int | None]` is not assignable to declared return type `dict[int, int] | None` [bad-return]
- ERROR zerver/lib/stream_traffic.py:29:22-42: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/stream_traffic.py:29:46-66: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/streams.py:335:9-22: The type of `user_group_id` is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/streams.py:335:24-39: The type of `user_profile_id` is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/streams.py:336:47-60: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/streams.py:337:45-60: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/user_counts.py:62:26-44: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/user_counts.py:62:49-74: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/user_groups.py:230:8-22: Implicit conversion of `QuerySet[UserGroup, Any]` to `bool` is not allowed [implicit-bool]
+ ERROR zerver/lib/user_groups.py:230:8-22: Implicit conversion of `QuerySet[UserGroup, int]` to `bool` is not allowed [implicit-bool]
- ERROR zerver/lib/user_groups.py:660:9-20: The type of `member_type` is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/user_groups.py:660:22-30: The type of `group_id` is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/user_groups.py:660:32-41: The type of `member_id` is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/user_groups.py:661:43-51: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/user_groups.py:663:48-57: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/user_groups.py:665:50-59: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/user_status.py:83:9-16: The type of `user_id` is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/user_status.py:84:23-30: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/user_status.py:84:54-57: Argument `dict[str, Any]` is not assignable to parameter `row` with type `RawUserInfoDict` in function `format_user_status` [bad-argument-type]
- ERROR zerver/lib/user_status.py:136:12-30: Implicit conversion of `dict[str, Any] | None` to `bool` is not allowed [implicit-bool]
+ ERROR zerver/lib/user_status.py:136:12-30: Implicit conversion of `dict[str, bool | int | str] | None` to `bool` is not allowed [implicit-bool]
- ERROR zerver/lib/user_status.py:138:31-49: Argument `dict[str, Any]` is not assignable to parameter `row` with type `RawUserInfoDict` in function `format_user_status` [bad-argument-type]
+ ERROR zerver/lib/user_status.py:138:31-49: Argument `dict[str, bool | int | str]` is not assignable to parameter `row` with type `RawUserInfoDict` in function `format_user_status` [bad-argument-type]
- ERROR zerver/lib/user_topics.py:53:51-70: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/user_topics.py:298:9-21: The type of `recipient_id` is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/user_topics.py:299:9-19: The type of `topic_name` is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/user_topics.py:300:9-26: The type of `visibility_policy` is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/user_topics.py:301:62-67: The type of attribute `lower` is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/user_topics.py:301:74-91: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/users.py:86:43-52: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/users.py:86:69-78: The type of `full_name` is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/users.py:899:30-42: The type of attribute `recipient_id` is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/users.py:899:47-50: The type of `row` is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/users.py:928:25-40: The type of attribute `user_profile_id` is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/users.py:928:45-48: The type of `row` is an explicit `Any` [explicit-any-use]
- ERROR zerver/lib/workplace_users.py:120:8-59: Implicit conversion of `set[Any]` to `bool` is not allowed [implicit-bool]
+ ERROR zerver/lib/workplace_users.py:120:8-59: Implicit conversion of `set[int]` to `bool` is not allowed [implicit-bool]
- ERROR zerver/management/commands/delete_external_auth_ids.py:55:59-63: The type of `name` is an explicit `Any` [explicit-any-use]
- ERROR zerver/management/commands/delete_external_auth_ids.py:55:65-70: The type of `count` is an explicit `Any` [explicit-any-use]
+ ERROR zerver/management/commands/delete_external_auth_ids.py:55:59-70: Cannot unpack tuple[str] (of size 1) into 2 values [bad-unpacking]
+ ERROR zerver/management/commands/delete_external_auth_ids.py:55:65-70: The type of `count` is unknown because it comes from an error [unknown-from-error]
- ERROR zerver/management/commands/export_search.py:281:44-48: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/management/commands/export_search.py:281:50-54: The type of this argument is an explicit `Any` [explicit-any-use]
- ERROR zerver/management/commands/export_search.py:281:60-61: The type of `e` is an explicit `Any` [explicit-any-use]

... (truncated 75 lines) ...

This branch has not been deployed

No deployments
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.

Django: infer row types for values() and values_list()

2 participants