Skip to content

Improve unittest.mock stubs #14421

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

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.

Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

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.

1 participant