Removes a lot of unused code#11698
Merged
Merged
Conversation
Member
Author
|
TODO: |
| return typ.fallback | ||
| else: | ||
| return None | ||
|
|
Collaborator
There was a problem hiding this comment.
I think we should keep this.
Member
Author
There was a problem hiding this comment.
Was it used in some important place? Or is it popular in plugin code? 🤔
Collaborator
There was a problem hiding this comment.
Personally speaking, this func helped me understand the effects of fallback and related code structure in mypy when I was a new contributor
Member
Author
There was a problem hiding this comment.
@97littleleaf11 we can try to solve this via docs. Probably I can copy paste this function into some docstring. Thanks a lot for the idea! 👍
sobolevn
commented
Dec 11, 2021
|
|
||
| The list of type variables may be empty. | ||
|
|
||
| Several types has fallbacks to `Instance`. Why? |
Collaborator
|
This is great. Looks like some of the useful looking functions in there dated back to the old semantic analyser. |
tushar-deepsource
pushed a commit
to DeepSourceCorp/mypy
that referenced
this pull request
Jan 20, 2022
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.
After working on #11696 I was interested in knowing how many more unused code we have.
I am not suggesting that we should remove everything I found, all items must be carefully reviewed. Because they might be used by other people. But, I am sure we can totally remove some of the code I found.