Converting "member" to "type(member)" on line 311 of completion.py to fix issue 272#290
Closed
bradleydamato wants to merge 4 commits intogoogle:masterfrom
bradleydamato:Issue272Fix
Closed
Converting "member" to "type(member)" on line 311 of completion.py to fix issue 272#290bradleydamato wants to merge 4 commits intogoogle:masterfrom bradleydamato:Issue272Fix
bradleydamato wants to merge 4 commits intogoogle:masterfrom
bradleydamato:Issue272Fix
Conversation
Contributor
Author
dbieber
reviewed
Oct 2, 2020
fire/completion.py
Outdated
| if verbose: | ||
| return True | ||
| if member in (absolute_import, division, print_function): | ||
| if type(member) in (absolute_import, division, print_function): |
Collaborator
There was a problem hiding this comment.
I don't think this is quite the check we want.
In Python 3 type(absolute_import) is __future__._Feature, which is fine.
However in Python 2 type(absolute_import) is instance which is too broad.
Instead we can do if (member is absolute_import or member is division or member is print_function)
Contributor
Author
There was a problem hiding this comment.
Sounds good @dbieber I'll make the change and push again
Contributor
Author
|
Looks like the line is too long; third time is the charm :). BRB. |
Collaborator
|
Looks good, thanks for the PR. |
dbieber
pushed a commit
that referenced
this pull request
Oct 2, 2020
bb58f26 by bradleydamato <[email protected]> ebc446f by bradleydamato <[email protected]> 98b131f by bradleydamato <[email protected]> COPYBARA_INTEGRATE_REVIEW=#290 from bradleydamato:Issue272Fix 98b131f PiperOrigin-RevId: 335063289 Change-Id: I1715092509aad11b0bbb681b76a1db7ab48e9a78
Collaborator
|
Merged in c378906 |
CherylMoonba
added a commit
to CherylMoonba/devices
that referenced
this pull request
Jul 20, 2025
bb58f2611469851d842f95a65da1bf926c0c85c3 by bradleydamato <[email protected]> ebc446fa79702ce532fb2e0355b69335e6ef027a by bradleydamato <[email protected]> 98b131f15d2f9540628942f975699a00a89d0c87 by bradleydamato <[email protected]> COPYBARA_INTEGRATE_REVIEW=google/python-fire#290 from bradleydamato:Issue272Fix 98b131f15d2f9540628942f975699a00a89d0c87 PiperOrigin-RevId: 335063289 Change-Id: I1715092509aad11b0bbb681b76a1db7ab48e9a78
KurtMuelle
added a commit
to KurtMuelle/obtained
that referenced
this pull request
Jul 22, 2025
bb58f2611469851d842f95a65da1bf926c0c85c3 by bradleydamato <[email protected]> ebc446fa79702ce532fb2e0355b69335e6ef027a by bradleydamato <[email protected]> 98b131f15d2f9540628942f975699a00a89d0c87 by bradleydamato <[email protected]> COPYBARA_INTEGRATE_REVIEW=google/python-fire#290 from bradleydamato:Issue272Fix 98b131f15d2f9540628942f975699a00a89d0c87 PiperOrigin-RevId: 335063289 Change-Id: I1715092509aad11b0bbb681b76a1db7ab48e9a78
hwlegends
pushed a commit
to hwlegends/python-fire
that referenced
this pull request
Aug 20, 2025
bb58f2611469851d842f95a65da1bf926c0c85c3 by bradleydamato <[email protected]> ebc446fa79702ce532fb2e0355b69335e6ef027a by bradleydamato <[email protected]> 98b131f15d2f9540628942f975699a00a89d0c87 by bradleydamato <[email protected]> COPYBARA_INTEGRATE_REVIEW=google/python-fire#290 from bradleydamato:Issue272Fix 98b131f15d2f9540628942f975699a00a89d0c87 PiperOrigin-RevId: 335063289 Change-Id: I1715092509aad11b0bbb681b76a1db7ab48e9a78
Hernandez19891
added a commit
to Hernandez19891/Illumina
that referenced
this pull request
Sep 15, 2025
bb58f2611469851d842f95a65da1bf926c0c85c3 by bradleydamato <[email protected]> ebc446fa79702ce532fb2e0355b69335e6ef027a by bradleydamato <[email protected]> 98b131f15d2f9540628942f975699a00a89d0c87 by bradleydamato <[email protected]> COPYBARA_INTEGRATE_REVIEW=google/python-fire#290 from bradleydamato:Issue272Fix 98b131f15d2f9540628942f975699a00a89d0c87 PiperOrigin-RevId: 335063289 Change-Id: I1715092509aad11b0bbb681b76a1db7ab48e9a78
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
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.
Passes:
completion_test.pycore_test.pymain_test.py