fix support type check for patch assert_called_with #3913 - #4795
Open
asukaminato0721 wants to merge 1 commit into
Open
fix support type check for patch assert_called_with #3913#4795asukaminato0721 wants to merge 1 commit into
asukaminato0721 wants to merge 1 commit into
Conversation
Contributor
|
This pull request has been imported. If you are a Meta employee, you can view this in D118577969. (Because this pull request was imported automatically, there will not be any future comments.) |
asukaminato0721
force-pushed
the
3913
branch
from
September 3, 2026 02:34
389b9b2 to
a76dd33
Compare
|
Diff from mypy_primer, showing the effect of this PR on open source code: ============================================================
SUMMARY
============================================================
Total: +44 new errors, -28 fixed errors
By preset: +19/-0 (default), +19/-0 (strict)
Projects with changes (8):
openlibrary: +4 -0
cloud-init: +7 -7
mitmproxy: +0 -4
rotki: +21 -16
alerta: +1 -1
urllib3: +2 -0
apprise: +4 -0
zulip: +5 -0
============================================================
FULL DIFF DETAILS
------------------------------------------------------------
openlibrary (https://github.com/internetarchive/openlibrary)
+ ERROR openlibrary/plugins/worksearch/tests/test_autocomplete.py:105:45-62: Missing argument `key` in function `openlibrary.plugins.worksearch.autocomplete.autocomplete.db_fetch` [missing-argument]
+ ERROR openlibrary/plugins/worksearch/tests/test_autocomplete.py:105:46-61: Argument `Literal['/works/OL123W']` is not assignable to parameter `self` with type `autocomplete` in function `openlibrary.plugins.worksearch.autocomplete.autocomplete.db_fetch` [bad-argument-type]
+ ERROR openlibrary/tests/core/test_ratings.py:44:65-82: Argument `int` is not assignable to parameter `bookshelf_id` with type `str` in function `openlibrary.core.bookshelves.Bookshelves.add` [bad-argument-type]
+ ERROR openlibrary/tests/core/test_ratings.py:44:84-87: Argument `Literal[123]` is not assignable to parameter `work_id` with type `str` in function `openlibrary.core.bookshelves.Bookshelves.add` [bad-argument-type]
cloud-init (https://github.com/canonical/cloud-init)
- ERROR tests/unittests/cmd/devel/test_hotplug_hook.py:61:5-25: Result of call expression is of type `AsyncMock | MagicMock` and is not used; assign to `_` if this is intentional [unused-call-result]
- ERROR tests/unittests/cmd/devel/test_hotplug_hook.py:62:5-33: Result of call expression is of type `AsyncMock | MagicMock` and is not used; assign to `_` if this is intentional [unused-call-result]
- ERROR tests/unittests/cmd/devel/test_hotplug_hook.py:63:5-22: Result of call expression is of type `AsyncMock | MagicMock` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR tests/unittests/cmd/devel/test_hotplug_hook.py:61:5-25: Result of call expression is of type `(iface: Unknown, field: Unknown, translate: Unknown | None = None) -> Unknown` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR tests/unittests/cmd/devel/test_hotplug_hook.py:62:5-33: Result of call expression is of type `(datasource: DataSource, cfg: dict[Unknown, Unknown], event_source_type: EventType, scope: EventScope) -> bool` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR tests/unittests/cmd/devel/test_hotplug_hook.py:63:5-22: Result of call expression is of type `(net_config: dict[Unknown, Unknown], skip_broken: bool = True, renderer: Unknown | None = None) -> NetworkState` and is not used; assign to `_` if this is intentional [unused-call-result]
- ERROR tests/unittests/distros/test_netconfig.py:294:5-50: Result of call expression is of type `_patch_pass_arg[AsyncMock | MagicMock]` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR tests/unittests/distros/test_netconfig.py:294:5-50: Result of call expression is of type `_patch_pass_arg[() -> Unknown]` and is not used; assign to `_` if this is intentional [unused-call-result]
- ERROR tests/unittests/sources/test_vmware.py:164:13-43: Result of call expression is of type `AsyncMock | MagicMock` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR tests/unittests/sources/test_vmware.py:164:13-43: Result of call expression is of type `((aliased: bool = False, terse: bool = False) -> str) | ((empty: str | Unknown = '') -> dict[str, Interface]) | ((name: str | Unknown = '') -> Unknown)` and is not used; assign to `_` if this is intentional [unused-call-result]
- ERROR tests/unittests/test_net_activators.py:50:9-52:10: Result of call expression is of type `AsyncMock | MagicMock` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR tests/unittests/test_net_activators.py:50:9-52:10: Result of call expression is of type `() -> Unknown` and is not used; assign to `_` if this is intentional [unused-call-result]
- ERROR tests/unittests/test_net_activators.py:69:9-71:10: Result of call expression is of type `AsyncMock | MagicMock` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR tests/unittests/test_net_activators.py:69:9-71:10: Result of call expression is of type `() -> Unknown` and is not used; assign to `_` if this is intentional [unused-call-result]
mitmproxy (https://github.com/mitmproxy/mitmproxy)
- ERROR test/mitmproxy/addons/test_readfile.py:103:17-41: Result of call expression is of type `Unknown | None` and is not used; assign to `_` if this is intentional [unused-call-result]
- ERROR test/mitmproxy/addons/test_readfile.py:105:17-37: Result of call expression is of type `Unknown | None` and is not used; assign to `_` if this is intentional [unused-call-result]
- ERROR test/mitmproxy/addons/test_readfile.py:118:17-41: Result of call expression is of type `Unknown | None` and is not used; assign to `_` if this is intentional [unused-call-result]
- ERROR test/mitmproxy/addons/test_readfile.py:121:17-37: Result of call expression is of type `Unknown | None` and is not used; assign to `_` if this is intentional [unused-call-result]
rotki (https://github.com/rotki/rotki)
+ ERROR rotkehlchen/tests/api/test_evm_transactions.py:600:49-605:14: Missing argument `self` in function `rotkehlchen.chain.evm.transactions.EvmTransactions.refetch_transactions_for_address` [missing-argument]
+ ERROR rotkehlchen/tests/api/test_evm_transactions.py:604:39-43: Argument `Literal[True]` is not assignable to parameter `return_queried_hashes` with type `Literal[False]` in function `rotkehlchen.chain.evm.transactions.EvmTransactions.refetch_transactions_for_address` [bad-argument-type]
+ ERROR rotkehlchen/tests/api/test_external_services.py:334:48-338:6: Missing argument `self` in function `rotkehlchen.externalapis.monerium.MoneriumOAuthClient.complete_oauth` [missing-argument]
- ERROR rotkehlchen/tests/exchanges/test_kraken.py:347:9-41: Result of call expression is of type `AsyncMock | MagicMock` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR rotkehlchen/tests/exchanges/test_kraken.py:347:9-41: Result of call expression is of type `(seconds: float) -> None` and is not used; assign to `_` if this is intentional [unused-call-result]
- ERROR rotkehlchen/tests/fixtures/dataupdates.py:22:13-152: Result of call expression is of type `AsyncMock | MagicMock` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR rotkehlchen/tests/fixtures/dataupdates.py:22:13-152: Result of call expression is of type `(github: Github | None = None) -> VersionCheckResult` and is not used; assign to `_` if this is intentional [unused-call-result]
- ERROR rotkehlchen/tests/fixtures/db.py:123:13-48: Result of call expression is of type `AsyncMock | MagicMock` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR rotkehlchen/tests/fixtures/db.py:123:13-48: Result of call expression is of type `(self: DBUpgradeManager) -> bool` and is not used; assign to `_` if this is intentional [unused-call-result]
- ERROR rotkehlchen/tests/fixtures/globaldb.py:174:13-177:15: Result of call expression is of type `AsyncMock | MagicMock` and is not used; assign to `_` if this is intentional [unused-call-result]
- ERROR rotkehlchen/tests/fixtures/globaldb.py:178:13-181:15: Result of call expression is of type `AsyncMock | MagicMock` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR rotkehlchen/tests/fixtures/globaldb.py:174:13-177:15: Result of call expression is of type `(global_dir: Path, db_filename: str, sql_vm_instructions_cb: int, cached_statements: int | None = None) -> tuple[DBConnection, bool]` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR rotkehlchen/tests/fixtures/globaldb.py:178:13-181:15: Result of call expression is of type `(global_dir: Path, db_filename: str, sql_vm_instructions_cb: int, cached_statements: int | None = None) -> tuple[DBConnection, bool]` and is not used; assign to `_` if this is intentional [unused-call-result]
- ERROR rotkehlchen/tests/fixtures/globaldb.py:186:13-188:14: Result of call expression is of type `AsyncMock | MagicMock` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR rotkehlchen/tests/fixtures/globaldb.py:186:13-188:14: Result of call expression is of type `(connection: DBConnection) -> None` and is not used; assign to `_` if this is intentional [unused-call-result]
- ERROR rotkehlchen/tests/unit/globaldb/test_upgrades.py:2081:17-2083:19: Result of call expression is of type `AsyncMock | MagicMock` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR rotkehlchen/tests/unit/globaldb/test_upgrades.py:2081:17-2083:19: Result of call expression is of type `(upgrade: UpgradeRecord, connection: DBConnection, global_dir: Path, db_filename: str, progress_handler: DBUpgradeProgressHandler) -> None` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR rotkehlchen/tests/unit/test_bitcoin.py:599:44-74: Missing argument `endpoint` in function `rotkehlchen.chain.bitcoin.btc.manager.BitcoinManager._connect_node` [missing-argument]
+ ERROR rotkehlchen/tests/unit/test_bitcoin.py:599:45-73: Argument `Literal['https://localhost:4080/api']` is not assignable to parameter `self` with type `BitcoinManager` in function `rotkehlchen.chain.bitcoin.btc.manager.BitcoinManager._connect_node` [bad-argument-type]
- ERROR rotkehlchen/tests/unit/test_data_updates.py:362:9-98: Result of call expression is of type `AsyncMock | MagicMock` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR rotkehlchen/tests/unit/test_data_updates.py:362:9-98: Result of call expression is of type `(url: bytes | str, params: Iterable[tuple[bytes | float | int | str, Iterable[bytes | float | int | str] | bytes | float | int | str | None]] | SupportsItems[bytes | float | int | str, Iterable[bytes | float | int | str] | bytes | float | int | str | None] | bytes | str | tuple[bytes | float | int | str, Iterable[bytes | float | int | str] | bytes | float | int | str | None] | None = None, *, data: Iterable[bytes] | Mapping[Any, Any] | SupportsRead[bytes | str] | bytes | list[tuple[Any, Any]] | str | tuple[tuple[Any, Any], ...] | None = ..., headers: Mapping[str, bytes | str | None] | None = ..., cookies: CookieJar | MutableMapping[str, str] | None = ..., files: Iterable[tuple[str, SupportsRead[bytes | str] | bytes | str | tuple[str | None, SupportsRead[bytes | str] | bytes | str] | tuple[str | None, SupportsRead[bytes | str] | bytes | str, str] | tuple[str | None, SupportsRead[bytes | str] | bytes | str, str, Mapping[str, str]]]] | Mapping[str, SupportsRead[bytes | str] | bytes | str | tuple[str | None, SupportsRead[bytes | str] | bytes | str] | tuple[str | None, SupportsRead[bytes | str] | bytes | str, str] | tuple[str | None, SupportsRead[bytes | str] | bytes | str, str, Mapping[str, str]]] | None = ..., auth: ((PreparedRequest) -> PreparedRequest) | AuthBase | tuple[str, str] | None = ..., timeout: float | tuple[float | None, float | None] | None = ..., allow_redirects: bool = ..., proxies: MutableMapping[str, str] | None = ..., hooks: Mapping[str, ((Response) -> Any) | Iterable[(Response) -> Any]] | None = ..., stream: bool | None = ..., verify: bool | str | None = ..., cert: str | tuple[str, str] | None = ..., json: Any | None = None) -> Response` and is not used; assign to `_` if this is intentional [unused-call-result]
- ERROR rotkehlchen/tests/unit/test_data_updates.py:396:9-94: Result of call expression is of type `AsyncMock | MagicMock` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR rotkehlchen/tests/unit/test_data_updates.py:396:9-94: Result of call expression is of type `(url: bytes | str, params: Iterable[tuple[bytes | float | int | str, Iterable[bytes | float | int | str] | bytes | float | int | str | None]] | SupportsItems[bytes | float | int | str, Iterable[bytes | float | int | str] | bytes | float | int | str | None] | bytes | str | tuple[bytes | float | int | str, Iterable[bytes | float | int | str] | bytes | float | int | str | None] | None = None, *, data: Iterable[bytes] | Mapping[Any, Any] | SupportsRead[bytes | str] | bytes | list[tuple[Any, Any]] | str | tuple[tuple[Any, Any], ...] | None = ..., headers: Mapping[str, bytes | str | None] | None = ..., cookies: CookieJar | MutableMapping[str, str] | None = ..., files: Iterable[tuple[str, SupportsRead[bytes | str] | bytes | str | tuple[str | None, SupportsRead[bytes | str] | bytes | str] | tuple[str | None, SupportsRead[bytes | str] | bytes | str, str] | tuple[str | None, SupportsRead[bytes | str] | bytes | str, str, Mapping[str, str]]]] | Mapping[str, SupportsRead[bytes | str] | bytes | str | tuple[str | None, SupportsRead[bytes | str] | bytes | str] | tuple[str | None, SupportsRead[bytes | str] | bytes | str, str] | tuple[str | None, SupportsRead[bytes | str] | bytes | str, str, Mapping[str, str]]] | None = ..., auth: ((PreparedRequest) -> PreparedRequest) | AuthBase | tuple[str, str] | None = ..., timeout: float | tuple[float | None, float | None] | None = ..., allow_redirects: bool = ..., proxies: MutableMapping[str, str] | None = ..., hooks: Mapping[str, ((Response) -> Any) | Iterable[(Response) -> Any]] | None = ..., stream: bool | None = ..., verify: bool | str | None = ..., cert: str | tuple[str, str] | None = ..., json: Any | None = None) -> Response` and is not used; assign to `_` if this is intentional [unused-call-result]
- ERROR rotkehlchen/tests/unit/test_data_updates.py:417:9-118: Result of call expression is of type `AsyncMock | MagicMock` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR rotkehlchen/tests/unit/test_data_updates.py:417:9-118: Result of call expression is of type `(url: bytes | str, params: Iterable[tuple[bytes | float | int | str, Iterable[bytes | float | int | str] | bytes | float | int | str | None]] | SupportsItems[bytes | float | int | str, Iterable[bytes | float | int | str] | bytes | float | int | str | None] | bytes | str | tuple[bytes | float | int | str, Iterable[bytes | float | int | str] | bytes | float | int | str | None] | None = None, *, data: Iterable[bytes] | Mapping[Any, Any] | SupportsRead[bytes | str] | bytes | list[tuple[Any, Any]] | str | tuple[tuple[Any, Any], ...] | None = ..., headers: Mapping[str, bytes | str | None] | None = ..., cookies: CookieJar | MutableMapping[str, str] | None = ..., files: Iterable[tuple[str, SupportsRead[bytes | str] | bytes | str | tuple[str | None, SupportsRead[bytes | str] | bytes | str] | tuple[str | None, SupportsRead[bytes | str] | bytes | str, str] | tuple[str | None, SupportsRead[bytes | str] | bytes | str, str, Mapping[str, str]]]] | Mapping[str, SupportsRead[bytes | str] | bytes | str | tuple[str | None, SupportsRead[bytes | str] | bytes | str] | tuple[str | None, SupportsRead[bytes | str] | bytes | str, str] | tuple[str | None, SupportsRead[bytes | str] | bytes | str, str, Mapping[str, str]]] | None = ..., auth: ((PreparedRequest) -> PreparedRequest) | AuthBase | tuple[str, str] | None = ..., timeout: float | tuple[float | None, float | None] | None = ..., allow_redirects: bool = ..., proxies: MutableMapping[str, str] | None = ..., hooks: Mapping[str, ((Response) -> Any) | Iterable[(Response) -> Any]] | None = ..., stream: bool | None = ..., verify: bool | str | None = ..., cert: str | tuple[str, str] | None = ..., json: Any | None = None) -> Response` and is not used; assign to `_` if this is intentional [unused-call-result]
- ERROR rotkehlchen/tests/unit/test_data_updates.py:438:9-115: Result of call expression is of type `AsyncMock | MagicMock` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR rotkehlchen/tests/unit/test_data_updates.py:438:9-115: Result of call expression is of type `(url: bytes | str, params: Iterable[tuple[bytes | float | int | str, Iterable[bytes | float | int | str] | bytes | float | int | str | None]] | SupportsItems[bytes | float | int | str, Iterable[bytes | float | int | str] | bytes | float | int | str | None] | bytes | str | tuple[bytes | float | int | str, Iterable[bytes | float | int | str] | bytes | float | int | str | None] | None = None, *, data: Iterable[bytes] | Mapping[Any, Any] | SupportsRead[bytes | str] | bytes | list[tuple[Any, Any]] | str | tuple[tuple[Any, Any], ...] | None = ..., headers: Mapping[str, bytes | str | None] | None = ..., cookies: CookieJar | MutableMapping[str, str] | None = ..., files: Iterable[tuple[str, SupportsRead[bytes | str] | bytes | str | tuple[str | None, SupportsRead[bytes | str] | bytes | str] | tuple[str | None, SupportsRead[bytes | str] | bytes | str, str] | tuple[str | None, SupportsRead[bytes | str] | bytes | str, str, Mapping[str, str]]]] | Mapping[str, SupportsRead[bytes | str] | bytes | str | tuple[str | None, SupportsRead[bytes | str] | bytes | str] | tuple[str | None, SupportsRead[bytes | str] | bytes | str, str] | tuple[str | None, SupportsRead[bytes | str] | bytes | str, str, Mapping[str, str]]] | None = ..., auth: ((PreparedRequest) -> PreparedRequest) | AuthBase | tuple[str, str] | None = ..., timeout: float | tuple[float | None, float | None] | None = ..., allow_redirects: bool = ..., proxies: MutableMapping[str, str] | None = ..., hooks: Mapping[str, ((Response) -> Any) | Iterable[(Response) -> Any]] | None = ..., stream: bool | None = ..., verify: bool | str | None = ..., cert: str | tuple[str, str] | None = ..., json: Any | None = None) -> Response` and is not used; assign to `_` if this is intentional [unused-call-result]
- ERROR rotkehlchen/tests/utils/pnl_report.py:44:9-47:11: Result of call expression is of type `AsyncMock | MagicMock` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR rotkehlchen/tests/utils/pnl_report.py:44:9-47:11: Result of call expression is of type `(self: EvmNodeInquirer, address: ChecksumAddress) -> bool` and is not used; assign to `_` if this is intentional [unused-call-result]
- ERROR rotkehlchen/tests/utils/solana.py:39:9-42:11: Result of call expression is of type `AsyncMock | MagicMock` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR rotkehlchen/tests/utils/solana.py:39:9-42:11: Result of call expression is of type `(self: SolanaRPCMixin) -> list[WeightedNode]` and is not used; assign to `_` if this is intentional [unused-call-result]
- ERROR rotkehlchen/tests/utils/solana.py:43:9-46:11: Result of call expression is of type `AsyncMock | MagicMock` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR rotkehlchen/tests/utils/solana.py:43:9-46:11: Result of call expression is of type `(client: Client) -> bool` and is not used; assign to `_` if this is intentional [unused-call-result]
- ERROR rotkehlchen/tests/utils/solana.py:47:9-50:11: Result of call expression is of type `AsyncMock | MagicMock` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR rotkehlchen/tests/utils/solana.py:47:9-50:11: Result of call expression is of type `(client: Client) -> bool` and is not used; assign to `_` if this is intentional [unused-call-result]
- ERROR rotkehlchen/tests/utils/solana.py:52:9-55:11: Result of call expression is of type `AsyncMock | MagicMock` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR rotkehlchen/tests/utils/solana.py:52:9-55:11: Result of call expression is of type `(self: SolanaRPCMixin) -> list[WeightedNode]` and is not used; assign to `_` if this is intentional [unused-call-result]
alerta (https://github.com/alerta/alerta)
- ERROR tests/test_zrouting.py:39:9-32: Result of call expression is of type `AsyncMock | MagicMock` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR tests/test_zrouting.py:39:9-32: Result of call expression is of type `(*, name: str = ..., value: str = ..., group: str = ..., module: str = ..., attr: str = ..., extras: list[str] = ...) -> EntryPoints` and is not used; assign to `_` if this is intentional [unused-call-result]
urllib3 (https://github.com/urllib3/urllib3)
+ ERROR test/with_dummyserver/test_poolmanager.py:727:43-739:14: Missing argument `url` in function `urllib3._request_methods.RequestMethods.request` [missing-argument]
+ ERROR test/with_dummyserver/test_poolmanager.py:728:17-22: Argument `Literal['GET']` is not assignable to parameter `self` with type `RequestMethods` in function `urllib3._request_methods.RequestMethods.request` [bad-argument-type]
apprise (https://github.com/caronc/apprise)
+ ERROR tests/test_compat_py39.py:51:9-59: Result of call expression is of type `None` and is not used; assign to `_` if this is intentional [unused-call-result]
+ ERROR tests/test_retry_wait.py:257:48-66: Argument `ApproxBase` is not assignable to parameter `seconds` with type `SupportsIndex | float` in function `time.sleep` [bad-argument-type]
+ ERROR tests/test_retry_wait.py:375:48-66: Argument `ApproxBase` is not assignable to parameter `seconds` with type `SupportsIndex | float` in function `time.sleep` [bad-argument-type]
+ ERROR tests/test_retry_wait.py:442:48-66: Argument `ApproxBase` is not assignable to parameter `delay` with type `float` in function `asyncio.tasks.sleep` [bad-argument-type]
zulip (https://github.com/zulip/zulip)
+ ERROR zerver/tests/test_auth_backends.py:8756:39-58: Argument `UserProfile | str | None` is not assignable to parameter `user_profile` with type `UserProfile` in function `zerver.actions.user_settings.do_change_full_name` [bad-argument-type]
+ ERROR zerver/tests/test_auth_backends.py:8756:39-58: Argument `UserProfile | str | None` is not assignable to parameter `full_name` with type `str` in function `zerver.actions.user_settings.do_change_full_name` [bad-argument-type]
+ ERROR zerver/tests/test_auth_backends.py:8756:39-58: Argument `UserProfile | str | None` is not assignable to parameter `acting_user` with type `UserProfile | None` in function `zerver.actions.user_settings.do_change_full_name` [bad-argument-type]
+ ERROR zerver/tests/test_push_notifications.py:1316:65-77: Missing argument `certfile` in function `_ssl._SSLContext.load_cert_chain` [missing-argument]
+ ERROR zerver/tests/test_push_notifications.py:1316:66-76: Argument `Literal['/foo.pem']` is not assignable to parameter `self` with type `SSLContext` in function `_ssl._SSLContext.load_cert_chain` [bad-argument-type] |
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
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
Fixes #3913
patch("module.callable") now retains the target signature through context managers and .start().
assert_called_with,assert_called_once_with,assert_any_call, and async equivalents validate arguments.Handles sync, async, and bound methods.
new_callable= retains its declared replacement type.
Test Plan
add test