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

Improve unittest.mock.patch() types #4277

Merged
merged 4 commits into from
Sep 21, 2020

Conversation

srittau
Copy link
Collaborator

@srittau srittau commented Jun 26, 2020

No description provided.

@srittau
Copy link
Collaborator Author

srittau commented Jun 26, 2020

pytype most likely fails for the same reason it failed for the Big Reformat. Should be fixed with the new pytype release. See also google/pytype#608.

@srittau srittau added the status: deferred Issue or PR deferred until some precondition is fixed label Jun 26, 2020
Copy link
Collaborator

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

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

Skimmed, looks reasonable. I think we can undefer this — seems like new pytype is with us! :-)

stdlib/3/unittest/mock.pyi Outdated Show resolved Hide resolved
@srittau srittau removed the status: deferred Issue or PR deferred until some precondition is fixed label Jun 29, 2020
@srittau
Copy link
Collaborator Author

srittau commented Jun 29, 2020

@hauntsaninja Undeferred and merged in master, let's see what CI says.

@srittau
Copy link
Collaborator Author

srittau commented Jun 29, 2020

For some reason, travis and GitHub are not playing along. Travis CI is still running.

@srittau
Copy link
Collaborator Author

srittau commented Jun 29, 2020

Travis CI passes.

@hauntsaninja
Copy link
Collaborator

Thanks! Willing to add getter as Callable[[], Any] and attribute as str to this?

@srittau
Copy link
Collaborator Author

srittau commented Sep 18, 2020

@hauntsaninja I overlooked that comment. Added now.

@JelleZijlstra JelleZijlstra merged commit f14d6ea into python:master Sep 21, 2020
@srittau srittau deleted the unittest-improvements branch September 21, 2020 13:28
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.

3 participants