-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix a crash when calling copy.copy()
without args
#8784
Conversation
copy.copy(**{"x": os.environ}) # [shallow-copy-environ] | ||
copy.copy(**{"y": os.environ}) # [unexpected-keyword-arg] | ||
copy.copy(y=os.environ) # [no-value-for-parameter, unexpected-keyword-arg] |
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.
I would expect the last two lines to raise the same set of messages. We don't use inference to analyze whether **kwargs contains the missing named parameter x
. We could.
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.
Captured in #8785
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #8784 +/- ##
=======================================
Coverage 95.83% 95.84%
=======================================
Files 173 173
Lines 18459 18466 +7
=======================================
+ Hits 17691 17698 +7
Misses 768 768
|
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.
LGTM !
(cherry picked from commit 92485a3)
(cherry picked from commit 92485a3) Co-authored-by: Jacob Walls <[email protected]>
Type of Changes
Description
Closes #8774