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

Add backport for mock #80

Merged
merged 1 commit into from
Dec 26, 2021
Merged

Add backport for mock #80

merged 1 commit into from
Dec 26, 2021

Conversation

indrat
Copy link
Contributor

@indrat indrat commented Dec 26, 2021

Add backport details for mock and adjust rules to allow python 3.6

@netromdk netromdk self-requested a review December 26, 2021 07:35
@netromdk netromdk self-assigned this Dec 26, 2021
Copy link
Owner

@netromdk netromdk left a 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)),

Copy link
Owner

@netromdk netromdk left a comment

Choose a reason for hiding this comment

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

Great!

@coveralls
Copy link

Coverage Status

Coverage increased (+0.0003%) to 99.58% when pulling 306b205 on indrat:add-mock-backport into ad65edf on netromdk:master.

@netromdk netromdk merged commit 4b50bc1 into netromdk:master Dec 26, 2021
@indrat indrat deleted the add-mock-backport branch December 27, 2021 03:43
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