-
Notifications
You must be signed in to change notification settings - Fork 25
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
Add backport for mock #80
Merged
Merged
Conversation
This file contains 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
netromdk
requested changes
Dec 26, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR, @indrat!
The changes look good. Before the workflows are run, if you could fix the following:
% make check-style
flake8 --count --show-source vermin tests vermin.py runtests.py count.py
vermin/rules.py:351:87: E231 missing whitespace after ','
"unittest.mock.AsyncMock": (None, (3, 8)) if not bp("mock", config) else (None, (3,6)),
^
vermin/rules.py:1600:82: E231 missing whitespace after ','
"unittest.mock.seal": (None, (3, 7)) if not bp("mock", config) else (None, (3,6)),
^
vermin/rules.py:2481:97: E231 missing whitespace after ','
"unittest.mock.Mock.call_args.args": (None, (3, 8)) if not bp("mock", config) else (None, (3,6)),
^
vermin/rules.py:2481:101: E501 line too long (101 > 100 characters)
"unittest.mock.Mock.call_args.args": (None, (3, 8)) if not bp("mock", config) else (None, (3,6)),
^
vermin/rules.py:2482:99: E231 missing whitespace after ','
"unittest.mock.Mock.call_args.kwargs": (None, (3, 8)) if not bp("mock", config) else (None, (3,6)),
^
vermin/rules.py:2482:101: E501 line too long (103 > 100 characters)
"unittest.mock.Mock.call_args.kwargs": (None, (3, 8)) if not bp("mock", config) else (None, (3,6)),
^
6
make: *** [check-style] Error 1
Via:
modified vermin/rules.py
@@ -348,7 +348,7 @@ def MOD_MEM_REQS(config):
"typing.TypedDict": (None, (3, 8)) if not bp("typing", config) else ((2, 7), (3, 8)),
"unittest.IsolatedAsyncioTestCase": (None, (3, 8)),
"unittest.TextTestResult": ((2, 7), (3, 2)),
- "unittest.mock.AsyncMock": (None, (3, 8)) if not bp("mock", config) else (None, (3,6)),
+ "unittest.mock.AsyncMock": (None, (3, 8)) if not bp("mock", config) else (None, (3, 6)),
"urllib.parse.DefragResult": (None, (3, 2)),
"urllib.parse.DefragResultBytes": (None, (3, 2)),
"urllib.parse.ParseResultBytes": (None, (3, 2)),
@@ -1597,7 +1597,7 @@ def MOD_MEM_REQS(config):
"unittest.mock.Mock.assert_called": (None, (3, 6)),
"unittest.mock.Mock.assert_called_once": (None, (3, 6)),
"unittest.mock.Mock.assert_not_called": (None, (3, 5)),
- "unittest.mock.seal": (None, (3, 7)) if not bp("mock", config) else (None, (3,6)),
+ "unittest.mock.seal": (None, (3, 7)) if not bp("mock", config) else (None, (3, 6)),
"unittest.registerResult": ((2, 7), (3, 2)),
"unittest.removeHandler": ((2, 7), (3, 2)),
"unittest.removeResult": ((2, 7), (3, 2)),
@@ -2478,8 +2478,10 @@ def MOD_MEM_REQS(config):
"unittest.TestResult.failfast": ((2, 7), (3, 2)),
"unittest.TestResult.skipped": ((2, 7), (3, 1)),
"unittest.TestResult.tb_locals": (None, (3, 5)),
- "unittest.mock.Mock.call_args.args": (None, (3, 8)) if not bp("mock", config) else (None, (3,6)),
- "unittest.mock.Mock.call_args.kwargs": (None, (3, 8)) if not bp("mock", config) else (None, (3,6)),
+ "unittest.mock.Mock.call_args.args": (None, (3, 8))
+ if not bp("mock", config) else (None, (3, 6)),
+ "unittest.mock.Mock.call_args.kwargs": (None, (3, 8))
+ if not bp("mock", config) else (None, (3, 6)),
netromdk
approved these changes
Dec 26, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great!
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.
Add backport details for mock and adjust rules to allow python 3.6