Skip to content
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

Make unittest.patch.* methods static #7543

Merged
merged 6 commits into from
Nov 1, 2022
Merged

Conversation

srittau
Copy link
Collaborator

@srittau srittau commented Mar 24, 2022

Closes: #7542

@srittau srittau marked this pull request as ready for review March 24, 2022 12:10
@srittau srittau closed this Mar 24, 2022
@srittau srittau reopened this Mar 24, 2022
@github-actions

This comment has been minimized.

@srittau
Copy link
Collaborator Author

srittau commented Mar 24, 2022

Weird primer output. In the first failure, it seems that the first overload matches:

urllib3 (https://github.com/urllib3/urllib3)
+ test/test_queue_monkeypatch.py:25: error: No overload variant of "object" of "_patcher" matches argument types Module, "str", "Type[BadError]"  [call-overload]
+ test/test_queue_monkeypatch.py:25: note: Possible overload variants:
+ test/test_queue_monkeypatch.py:25: note:     def [_T] object(target, attribute: str, new: _T, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[_T]
+ test/test_queue_monkeypatch.py:25: note:     def object(target, attribute: str, *, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[Union[MagicMock, AsyncMock]]

_T is not constrained. Especially when compared to #7542. Anyone got a clue what's going on here?

@github-actions

This comment has been minimized.

@srittau
Copy link
Collaborator Author

srittau commented Mar 29, 2022

The primer problems seem due to a mypy bug: python/mypy#7781.

@JelleZijlstra
Copy link
Member

So what should we do here? I don't think we can afford to merge this until the mypy bug is fixed.

@srittau srittau added the status: deferred Issue or PR deferred until some precondition is fixed label Apr 14, 2022
@srittau
Copy link
Collaborator Author

srittau commented Apr 14, 2022

I agree. I marked this PR as "deferred" for now.

@srittau
Copy link
Collaborator Author

srittau commented Aug 23, 2022

Fixed in python/mypy#13482, so should be part of the next mypy release.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@AlexWaygood
Copy link
Member

Fixed in python/mypy#13482, so should be part of the next mypy release.

Sadly, the mypy fix didn't quite make it into 0.981, so we'll have to wait a little longer. But it should be in 0.99x.

@hauntsaninja
Copy link
Collaborator

hauntsaninja commented Sep 28, 2022

If this is definitely fixed on mypy master, we should merge. If we want to run primer on this with the mypy fix, let me know and I can run it ad hoc.

@AlexWaygood
Copy link
Member

If we want to run primer on this with the mypy fix, let me know and I can run it ad hoc.

That would be great!

@hauntsaninja
Copy link
Collaborator

According to mypy_primer -o concise --new HEAD --old HEAD --custom-typeshed-repo ~/dev/typeshed --new-typeshed unittest-patch --old-typeshed origin/master no meaningful changes 🤖🎉

@AlexWaygood AlexWaygood removed the status: deferred Issue or PR deferred until some precondition is fixed label Sep 28, 2022
Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried the original snippet in the issue out using mypy master, and unfortunately it doesn't seem as though this actually fixes the problem in the issue. With this patch applied, using mypy master, here is mypy's output on @graingert's snippet:

test.py:6: error: No overload variant of "object" of "_patcher" matches argument types Module, "str", "Dict[str, Type[KeyboardInterrupt]]"  [call-overload]
test.py:6: note: Possible overload variants:
test.py:6: note:     def [_T] object(target: Any, attribute: str, new: _T, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[_T]
test.py:6: note:     def object(target: Any, attribute: str, *, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[Union[MagicMock, AsyncMock]]
Found 1 error in 1 file (checked 1 source file)

However, this PR does seem like a good thing to do regardless of whether it fixes the issue.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 1, 2022

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

tornado (https://github.com/tornadoweb/tornado)
+ tornado/test/auth_test.py:408: error: No overload variant of "object" of "_patcher" matches argument types "Type[OAuth1ServerRequestTokenHandler]", "str"
+ tornado/test/auth_test.py:408: note: Possible overload variants:
+ tornado/test/auth_test.py:408: note:     def [_T] object(target, attribute: str, new: _T, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[_T]
+ tornado/test/auth_test.py:408: note:     def object(target, attribute: str, *, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[MagicMock]
+ tornado/test/options_test.py:183: error: No overload variant of "object" of "_patcher" matches argument types "_Mockable", "str", "int"
+ tornado/test/options_test.py:183: note: Possible overload variants:
+ tornado/test/options_test.py:183: note:     def [_T] object(target, attribute: str, new: _T, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[_T]
+ tornado/test/options_test.py:183: note:     def object(target, attribute: str, *, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[MagicMock]
+ tornado/test/options_test.py:188: error: No overload variant of "object" of "_patcher" matches argument types "_Mockable", "str", "int"
+ tornado/test/options_test.py:188: note: Possible overload variants:
+ tornado/test/options_test.py:188: note:     def [_T] object(target, attribute: str, new: _T, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[_T]
+ tornado/test/options_test.py:188: note:     def object(target, attribute: str, *, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[MagicMock]
+ tornado/test/options_test.py:192: error: No overload variant of "object" of "_patcher" matches argument types "_Mockable", "str", "int"
+ tornado/test/options_test.py:192: note: Possible overload variants:
+ tornado/test/options_test.py:192: note:     def [_T] object(target, attribute: str, new: _T, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[_T]
+ tornado/test/options_test.py:192: note:     def object(target, attribute: str, *, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[MagicMock]

streamlit (https://github.com/streamlit/streamlit)
+ lib/tests/testutil.py: note: In function "patch_config_options":
+ lib/tests/testutil.py:39:10: error: No overload variant of "object" of "_patcher" matches argument types Module, "str", "Any"  [call-overload]
+ lib/tests/testutil.py:39:10: note: Possible overload variants:
+ lib/tests/testutil.py:39:10: note:     def [_T] object(target, attribute: str, new: _T, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[_T]
+ lib/tests/testutil.py:39:10: note:     def object(target, attribute: str, *, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[Union[MagicMock, AsyncMock]]
+ lib/tests/streamlit/write_test.py: note: In member "test_empty" of class "StreamlitWriteTest":
+ lib/tests/streamlit/write_test.py:309:18: error: No overload variant of "object" of "_patcher" matches argument types "Type[DeltaGenerator]", "str", "Type[PropertyMock]"  [call-overload]
+ lib/tests/streamlit/write_test.py:309:18: note: Possible overload variants:
+ lib/tests/streamlit/write_test.py:309:18: note:     def [_T] object(target, attribute: str, new: _T, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[_T]
+ lib/tests/streamlit/write_test.py:309:18: note:     def object(target, attribute: str, *, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[Union[MagicMock, AsyncMock]]
+ lib/tests/streamlit/logger_test.py:99:14: error: No overload variant of "object" of "_patcher" matches argument types Module, "str", "Any"  [call-overload]
+ lib/tests/streamlit/logger_test.py:99:14: note: Possible overload variants:
+ lib/tests/streamlit/logger_test.py:99:14: note:     def [_T] object(target, attribute: str, new: _T, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[_T]
+ lib/tests/streamlit/logger_test.py:99:14: note:     def object(target, attribute: str, *, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[Union[MagicMock, AsyncMock]]
- lib/tests/streamlit/config_test.py:45:13: error: "object" has no attribute "start"  [attr-defined]
- lib/tests/streamlit/config_test.py: note: In member "tearDown" of class "ConfigTest":
- lib/tests/streamlit/config_test.py:49:13: error: "object" has no attribute "stop"  [attr-defined]
+ lib/tests/streamlit/config_test.py:38:13: error: No overload variant of "object" of "_patcher" matches argument types Module, "str", "Dict[str, str]"  [call-overload]
+ lib/tests/streamlit/config_test.py:38:13: note: Possible overload variants:
+ lib/tests/streamlit/config_test.py:38:13: note:     def [_T] object(target, attribute: str, new: _T, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[_T]
+ lib/tests/streamlit/config_test.py:38:13: note:     def object(target, attribute: str, *, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[Union[MagicMock, AsyncMock]]
+ lib/tests/streamlit/config_test.py:41:13: error: No overload variant of "object" of "_patcher" matches argument types Module, "str", "Optional[Dict[str, ConfigOption]]"  [call-overload]
+ lib/tests/streamlit/config_test.py:41:13: note: Possible overload variants:
+ lib/tests/streamlit/config_test.py:41:13: note:     def [_T] object(target, attribute: str, new: _T, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[_T]
+ lib/tests/streamlit/config_test.py:41:13: note:     def object(target, attribute: str, *, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[Union[MagicMock, AsyncMock]]
+ lib/tests/streamlit/config_test.py: note: In member "test_on_config_parsed" of class "ConfigTest":
+ lib/tests/streamlit/config_test.py:526:14: error: No overload variant of "object" of "_patcher" matches argument types Module, "str", "Any"  [call-overload]
+ lib/tests/streamlit/config_test.py:526:14: note: Possible overload variants:
+ lib/tests/streamlit/config_test.py:526:14: note:     def [_T] object(target, attribute: str, new: _T, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[_T]
+ lib/tests/streamlit/config_test.py:526:14: note:     def object(target, attribute: str, *, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[Union[MagicMock, AsyncMock]]
+ lib/tests/streamlit/config_test.py:535:17: error: "str" has no attribute "assert_called_once"  [attr-defined]
+ lib/tests/streamlit/config_test.py:538:17: error: "str" has no attribute "assert_not_called"  [attr-defined]
+ lib/tests/streamlit/config_test.py:541:17: error: "str" has no attribute "assert_called_once"  [attr-defined]
+ lib/tests/streamlit/config_test.py:545:13: error: "str" has no attribute "assert_called_once"  [attr-defined]
- lib/tests/streamlit/config_test.py:560:13: error: "object" has no attribute "start"  [attr-defined]
- lib/tests/streamlit/config_test.py: note: In member "tearDown" of class "ConfigLoadingTest":
- lib/tests/streamlit/config_test.py:564:13: error: "object" has no attribute "stop"  [attr-defined]
+ lib/tests/streamlit/config_test.py:553:13: error: No overload variant of "object" of "_patcher" matches argument types Module, "str", "Dict[str, str]"  [call-overload]
+ lib/tests/streamlit/config_test.py:553:13: note: Possible overload variants:
+ lib/tests/streamlit/config_test.py:553:13: note:     def [_T] object(target, attribute: str, new: _T, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[_T]
+ lib/tests/streamlit/config_test.py:553:13: note:     def object(target, attribute: str, *, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[Union[MagicMock, AsyncMock]]
+ lib/tests/streamlit/config_test.py:556:13: error: No overload variant of "object" of "_patcher" matches argument types Module, "str", "None"  [call-overload]
+ lib/tests/streamlit/config_test.py:556:13: note: Possible overload variants:
+ lib/tests/streamlit/config_test.py:556:13: note:     def [_T] object(target, attribute: str, new: _T, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[_T]
+ lib/tests/streamlit/config_test.py:556:13: note:     def object(target, attribute: str, *, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[Union[MagicMock, AsyncMock]]
+ lib/tests/streamlit/runtime/credentials_test.py:264:13: error: "str" has no attribute "assert_called_once"  [attr-defined]
+ lib/tests/streamlit/runtime/caching/singleton_test.py: note: In class "SingletonTest":
+ lib/tests/streamlit/runtime/caching/singleton_test.py:41:6: error: No overload variant of "object" of "_patcher" matches argument types Module, "str"  [call-overload]
+ lib/tests/streamlit/runtime/caching/singleton_test.py:41:6: note: Possible overload variants:
+ lib/tests/streamlit/runtime/caching/singleton_test.py:41:6: note:     def [_T] object(target, attribute: str, new: _T, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[_T]
+ lib/tests/streamlit/runtime/caching/singleton_test.py:41:6: note:     def object(target, attribute: str, *, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[Union[MagicMock, AsyncMock]]
+ lib/tests/streamlit/dataframe_selector_test.py: note: In class "DataFrameSelectorTest":
+ lib/tests/streamlit/dataframe_selector_test.py:39:6: error: No overload variant of "object" of "_patcher" matches argument types "Type[DeltaGenerator]", "str"  [call-overload]
+ lib/tests/streamlit/dataframe_selector_test.py:39:6: note: Possible overload variants:
+ lib/tests/streamlit/dataframe_selector_test.py:39:6: note:     def [_T] object(target, attribute: str, new: _T, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[_T]
+ lib/tests/streamlit/dataframe_selector_test.py:39:6: note:     def object(target, attribute: str, *, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[Union[MagicMock, AsyncMock]]
+ lib/tests/streamlit/dataframe_selector_test.py:40:6: error: No overload variant of "object" of "_patcher" matches argument types "Type[DeltaGenerator]", "str"  [call-overload]
+ lib/tests/streamlit/dataframe_selector_test.py:40:6: note: Possible overload variants:
+ lib/tests/streamlit/dataframe_selector_test.py:40:6: note:     def [_T] object(target, attribute: str, new: _T, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[_T]
+ lib/tests/streamlit/dataframe_selector_test.py:40:6: note:     def object(target, attribute: str, *, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[Union[MagicMock, AsyncMock]]
+ lib/tests/streamlit/dataframe_selector_test.py:47:6: error: No overload variant of "object" of "_patcher" matches argument types "Type[DeltaGenerator]", "str"  [call-overload]
+ lib/tests/streamlit/dataframe_selector_test.py:47:6: note: Possible overload variants:
+ lib/tests/streamlit/dataframe_selector_test.py:47:6: note:     def [_T] object(target, attribute: str, new: _T, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[_T]
+ lib/tests/streamlit/dataframe_selector_test.py:47:6: note:     def object(target, attribute: str, *, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[Union[MagicMock, AsyncMock]]
+ lib/tests/streamlit/dataframe_selector_test.py:48:6: error: No overload variant of "object" of "_patcher" matches argument types "Type[DeltaGenerator]", "str"  [call-overload]
+ lib/tests/streamlit/dataframe_selector_test.py:48:6: note: Possible overload variants:
+ lib/tests/streamlit/dataframe_selector_test.py:48:6: note:     def [_T] object(target, attribute: str, new: _T, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[_T]
+ lib/tests/streamlit/dataframe_selector_test.py:48:6: note:     def object(target, attribute: str, *, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[Union[MagicMock, AsyncMock]]
+ lib/tests/streamlit/dataframe_selector_test.py:57:6: error: No overload variant of "object" of "_patcher" matches argument types "Type[DeltaGenerator]", "str"  [call-overload]
+ lib/tests/streamlit/dataframe_selector_test.py:57:6: note: Possible overload variants:
+ lib/tests/streamlit/dataframe_selector_test.py:57:6: note:     def [_T] object(target, attribute: str, new: _T, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[_T]
+ lib/tests/streamlit/dataframe_selector_test.py:57:6: note:     def object(target, attribute: str, *, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[Union[MagicMock, AsyncMock]]
+ lib/tests/streamlit/dataframe_selector_test.py:58:6: error: No overload variant of "object" of "_patcher" matches argument types "Type[DeltaGenerator]", "str"  [call-overload]
+ lib/tests/streamlit/dataframe_selector_test.py:58:6: note: Possible overload variants:
+ lib/tests/streamlit/dataframe_selector_test.py:58:6: note:     def [_T] object(target, attribute: str, new: _T, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[_T]
+ lib/tests/streamlit/dataframe_selector_test.py:58:6: note:     def object(target, attribute: str, *, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[Union[MagicMock, AsyncMock]]
+ lib/tests/streamlit/dataframe_selector_test.py:70:6: error: No overload variant of "object" of "_patcher" matches argument types "Type[DeltaGenerator]", "str"  [call-overload]
+ lib/tests/streamlit/dataframe_selector_test.py:70:6: note: Possible overload variants:
+ lib/tests/streamlit/dataframe_selector_test.py:70:6: note:     def [_T] object(target, attribute: str, new: _T, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[_T]
+ lib/tests/streamlit/dataframe_selector_test.py:70:6: note:     def object(target, attribute: str, *, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[Union[MagicMock, AsyncMock]]
+ lib/tests/streamlit/dataframe_selector_test.py:71:6: error: No overload variant of "object" of "_patcher" matches argument types "Type[DeltaGenerator]", "str"  [call-overload]
+ lib/tests/streamlit/dataframe_selector_test.py:71:6: note: Possible overload variants:
+ lib/tests/streamlit/dataframe_selector_test.py:71:6: note:     def [_T] object(target, attribute: str, new: _T, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[_T]
+ lib/tests/streamlit/dataframe_selector_test.py:71:6: note:     def object(target, attribute: str, *, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[Union[MagicMock, AsyncMock]]
+ lib/tests/streamlit/dataframe_selector_test.py:85:6: error: No overload variant of "object" of "_patcher" matches argument types "Type[DeltaGenerator]", "str"  [call-overload]
+ lib/tests/streamlit/dataframe_selector_test.py:85:6: note: Possible overload variants:
+ lib/tests/streamlit/dataframe_selector_test.py:85:6: note:     def [_T] object(target, attribute: str, new: _T, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[_T]
+ lib/tests/streamlit/dataframe_selector_test.py:85:6: note:     def object(target, attribute: str, *, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[Union[MagicMock, AsyncMock]]
+ lib/tests/streamlit/dataframe_selector_test.py:86:6: error: No overload variant of "object" of "_patcher" matches argument types "Type[DeltaGenerator]", "str"  [call-overload]
+ lib/tests/streamlit/dataframe_selector_test.py:86:6: note: Possible overload variants:
+ lib/tests/streamlit/dataframe_selector_test.py:86:6: note:     def [_T] object(target, attribute: str, new: _T, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[_T]
+ lib/tests/streamlit/dataframe_selector_test.py:86:6: note:     def object(target, attribute: str, *, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[Union[MagicMock, AsyncMock]]
+ lib/tests/streamlit/dataframe_selector_test.py:98:6: error: No overload variant of "object" of "_patcher" matches argument types "Type[DeltaGenerator]", "str"  [call-overload]
+ lib/tests/streamlit/dataframe_selector_test.py:98:6: note: Possible overload variants:
+ lib/tests/streamlit/dataframe_selector_test.py:98:6: note:     def [_T] object(target, attribute: str, new: _T, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[_T]
+ lib/tests/streamlit/dataframe_selector_test.py:98:6: note:     def object(target, attribute: str, *, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[Union[MagicMock, AsyncMock]]
+ lib/tests/streamlit/dataframe_selector_test.py:99:6: error: No overload variant of "object" of "_patcher" matches argument types "Type[DeltaGenerator]", "str"  [call-overload]
+ lib/tests/streamlit/dataframe_selector_test.py:99:6: note: Possible overload variants:
+ lib/tests/streamlit/dataframe_selector_test.py:99:6: note:     def [_T] object(target, attribute: str, new: _T, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[_T]
+ lib/tests/streamlit/dataframe_selector_test.py:99:6: note:     def object(target, attribute: str, *, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[Union[MagicMock, AsyncMock]]
+ lib/tests/streamlit/dataframe_selector_test.py:106:6: error: No overload variant of "object" of "_patcher" matches argument types "Type[DeltaGenerator]", "str"  [call-overload]
+ lib/tests/streamlit/dataframe_selector_test.py:106:6: note: Possible overload variants:
+ lib/tests/streamlit/dataframe_selector_test.py:106:6: note:     def [_T] object(target, attribute: str, new: _T, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[_T]
+ lib/tests/streamlit/dataframe_selector_test.py:106:6: note:     def object(target, attribute: str, *, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[Union[MagicMock, AsyncMock]]
+ lib/tests/streamlit/dataframe_selector_test.py:107:6: error: No overload variant of "object" of "_patcher" matches argument types "Type[DeltaGenerator]", "str"  [call-overload]
+ lib/tests/streamlit/dataframe_selector_test.py:107:6: note: Possible overload variants:
+ lib/tests/streamlit/dataframe_selector_test.py:107:6: note:     def [_T] object(target, attribute: str, new: _T, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[_T]
+ lib/tests/streamlit/dataframe_selector_test.py:107:6: note:     def object(target, attribute: str, *, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[Union[MagicMock, AsyncMock]]
+ lib/tests/streamlit/dataframe_selector_test.py:114:6: error: No overload variant of "object" of "_patcher" matches argument types "Type[DeltaGenerator]", "str"  [call-overload]
+ lib/tests/streamlit/dataframe_selector_test.py:114:6: note: Possible overload variants:
+ lib/tests/streamlit/dataframe_selector_test.py:114:6: note:     def [_T] object(target, attribute: str, new: _T, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[_T]
+ lib/tests/streamlit/dataframe_selector_test.py:114:6: note:     def object(target, attribute: str, *, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[Union[MagicMock, AsyncMock]]
+ lib/tests/streamlit/dataframe_selector_test.py:115:6: error: No overload variant of "object" of "_patcher" matches argument types "Type[DeltaGenerator]", "str"  [call-overload]
+ lib/tests/streamlit/dataframe_selector_test.py:115:6: note: Possible overload variants:
+ lib/tests/streamlit/dataframe_selector_test.py:115:6: note:     def [_T] object(target, attribute: str, new: _T, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[_T]
+ lib/tests/streamlit/dataframe_selector_test.py:115:6: note:     def object(target, attribute: str, *, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[Union[MagicMock, AsyncMock]]
+ lib/tests/streamlit/dataframe_selector_test.py:124:6: error: No overload variant of "object" of "_patcher" matches argument types "Type[DeltaGenerator]", "str"  [call-overload]
+ lib/tests/streamlit/dataframe_selector_test.py:124:6: note: Possible overload variants:
+ lib/tests/streamlit/dataframe_selector_test.py:124:6: note:     def [_T] object(target, attribute: str, new: _T, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[_T]
+ lib/tests/streamlit/dataframe_selector_test.py:124:6: note:     def object(target, attribute: str, *, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[Union[MagicMock, AsyncMock]]
+ lib/tests/streamlit/dataframe_selector_test.py:125:6: error: No overload variant of "object" of "_patcher" matches argument types "Type[DeltaGenerator]", "str"  [call-overload]
+ lib/tests/streamlit/dataframe_selector_test.py:125:6: note: Possible overload variants:
+ lib/tests/streamlit/dataframe_selector_test.py:125:6: note:     def [_T] object(target, attribute: str, new: _T, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[_T]
+ lib/tests/streamlit/dataframe_selector_test.py:125:6: note:     def object(target, attribute: str, *, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[Union[MagicMock, AsyncMock]]
+ lib/tests/streamlit/dataframe_selector_test.py:139:6: error: No overload variant of "object" of "_patcher" matches argument types "Type[DeltaGenerator]", "str"  [call-overload]
+ lib/tests/streamlit/dataframe_selector_test.py:139:6: note: Possible overload variants:
+ lib/tests/streamlit/dataframe_selector_test.py:139:6: note:     def [_T] object(target, attribute: str, new: _T, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[_T]
+ lib/tests/streamlit/dataframe_selector_test.py:139:6: note:     def object(target, attribute: str, *, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[Union[MagicMock, AsyncMock]]
+ lib/tests/streamlit/dataframe_selector_test.py:140:6: error: No overload variant of "object" of "_patcher" matches argument types "Type[DeltaGenerator]", "str"  [call-overload]
+ lib/tests/streamlit/dataframe_selector_test.py:140:6: note: Possible overload variants:
+ lib/tests/streamlit/dataframe_selector_test.py:140:6: note:     def [_T] object(target, attribute: str, new: _T, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[_T]
+ lib/tests/streamlit/dataframe_selector_test.py:140:6: note:     def object(target, attribute: str, *, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[Union[MagicMock, AsyncMock]]
+ lib/tests/streamlit/dataframe_selector_test.py:149:6: error: No overload variant of "object" of "_patcher" matches argument types "Type[DeltaGenerator]", "str"  [call-overload]
+ lib/tests/streamlit/dataframe_selector_test.py:149:6: note: Possible overload variants:
+ lib/tests/streamlit/dataframe_selector_test.py:149:6: note:     def [_T] object(target, attribute: str, new: _T, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[_T]
+ lib/tests/streamlit/dataframe_selector_test.py:149:6: note:     def object(target, attribute: str, *, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch[Union[MagicMock, AsyncMock]]
+ lib/test

... (truncated 1105 lines) ...
@srittau srittau merged commit e7e94dd into python:main Nov 1, 2022
@srittau srittau deleted the unittest-patch branch November 1, 2022 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants