-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TYP: Create DeepChainMap from ChainMap.new_child in scope.py #44769
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
Conversation
Hello @kashifkhan! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2021-12-11 15:17:11 UTC |
pandas/core/computation/scope.py
Outdated
self.scope = self.scope.new_child( # type: ignore[assignment] | ||
(global_dict or frame.f_globals).copy() | ||
) | ||
self.scope = DeepChainMap(self.scope.new_child( (global_dict or frame.f_globals).copy())) |
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.
can you do this on two lines, so
foo = self.scope.whatever
self.scope = DeepChainMap(foo)
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.
sure, fixed in subsequent commits
@kashifkhan seems to be failing precommit; you can run this locally (and fix up) |
CI should be fixed if you merge master |
Sure Ill take care of this tomorrow !! |
thanks @kashifkhan |
xref #37715
scope is created as a DeepChainMap but on lines 139, 145, 262 call to new_child was returning ChainMap. Created a new DeepChainMap from the resulting ChainMap.