Allow dot'ted field in connectFrom of $graphLookup aggregation pipeline by arunl · Pull Request #686 · mongomock/mongomock
added 4 commits
December 31, 2020 01:12
arunl
mentioned this pull request
Removed parameterized test using pytest. Replaced with unittest. I am guessing unittest is preferred for compatibility with other versions and operating environments.
The function '_recursive_get' had yield-from, which is not supported by python 2.7. I thought I had changed it to an iterative yield. Turns out I had duplicate copy of this function. I had been changing one, and the other one was triggering Travis CI failure. I hope this settles the issue.
I was earlier using assertEqual(actual, expected), which was good enough for my work. I expected it would break somepoint. And it broke the CI. Looking around for options I lucked into the 'test__diff.py', and learned about 'tests.diff'. Am using that now instead.
Am flummoxed by this violation. Cannot recreate it on my machine. flake8 ran independently gives no error. tox -e pep8 (with python 3.6.7 and 3.8) errors out, with an exception that FlakeChecker doesn't have an attribute CONSTANT.
Required a lot of work for, in my opinion, a very superfluous coding
standard. To beat it I changed the docstring to be a single line
comment. It made the comment less readable, but it got me past H405.
The bright side, I was able to recreate the issue on my machine. It
required making a change to pyflakes/checker.py. For anyone experiencing
the same problem, here is the fix I used:
In pyflakes 1.2.3, file pyflakes/checker.py, change line 854
from:
STARRED = NAMECONSTANT = handleChildren
to:
STARRED = NAMECONSTANT = CONSTANT = handleChildren
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