Skip to content

Conversation

srittau
Copy link
Collaborator

@srittau srittau commented Jul 16, 2025

  • Mark _patcher and _patch_pass_arg as @type_check_only.
  • Add patch() default arguments.
  • Forbid certain argument combinations for patch().
  • Reorder patch() overloads.
  • Add unsafe argument.
  • Add overloads for path.multiple().

* Mark `_patcher` and `_patch_pass_arg` as `@type_check_only`.
* Add `patch()` default arguments.
* Forbid certain argument combinations for `patch()`.
* Reorder `patch()` overloads.
* Add `unsafe` argument.
* Add overloads for `path.multiple()`.
@srittau
Copy link
Collaborator Author

srittau commented Jul 16, 2025

We also need to replace many instances of Any with Incomplete.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

@JelleZijlstra
Copy link
Member

This has a merge conflict now, could you take a look?

@srittau srittau closed this Aug 22, 2025
@srittau srittau reopened this Aug 22, 2025
Copy link
Contributor

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

discord.py (https://github.com/Rapptz/discord.py)
- discord/ext/commands/hybrid.py:834: error: Overlap between argument names and ** TypedDict items: "name", "with_app_command"  [misc]
+ discord/ext/commands/hybrid.py:834: error: Overlap between argument names and ** TypedDict items: "with_app_command", "name"  [misc]
- discord/ext/commands/hybrid.py:858: error: Overlap between argument names and ** TypedDict items: "name", "with_app_command"  [misc]
+ discord/ext/commands/hybrid.py:858: error: Overlap between argument names and ** TypedDict items: "with_app_command", "name"  [misc]
- discord/ext/commands/hybrid.py:883: error: Overlap between argument names and ** TypedDict items: "name", "with_app_command"  [misc]
+ discord/ext/commands/hybrid.py:883: error: Overlap between argument names and ** TypedDict items: "with_app_command", "name"  [misc]
- discord/ext/commands/hybrid.py:935: error: Overlap between argument names and ** TypedDict items: "name", "with_app_command"  [misc]
+ discord/ext/commands/hybrid.py:935: error: Overlap between argument names and ** TypedDict items: "with_app_command", "name"  [misc]
- discord/ext/commands/bot.py:290: error: Overlap between argument names and ** TypedDict items: "name", "with_app_command"  [misc]
+ discord/ext/commands/bot.py:290: error: Overlap between argument names and ** TypedDict items: "with_app_command", "name"  [misc]
- discord/ext/commands/bot.py:314: error: Overlap between argument names and ** TypedDict items: "name", "with_app_command"  [misc]
+ discord/ext/commands/bot.py:314: error: Overlap between argument names and ** TypedDict items: "with_app_command", "name"  [misc]

@srittau srittau merged commit f8773eb into python:main Aug 22, 2025
191 of 221 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants