Uh oh!
There was an error while loading. Please reload this page.
Support concatenating lists with different contents - #5260
Closed
mrkmndz wants to merge 1 commit into
Closed
Conversation
mrkmndz
marked this pull request as draft
April 27, 2021 23:58
JelleZijlstra
commented
Apr 28, 2021
Member
mrkmndz
commented
Apr 28, 2021
ContributorAuthor
makes sense, I'll defer to #3183 then. |
Contributor
Diff from mypy_primer, showing the effect of this PR on open source code: mypy (https://github.com/python/mypy.git)
+ mypy/strconv.py:410: error: Unsupported operand types for + ("List[Any]" and "List[Union[str, Tuple[str, List[Any]]]]") [operator]+ mypy/test/testcmdline.py:59: error: Unsupported operand types for + ("List[str]" and "List[str]") [operator]+ mypyc/test/test_commandline.py:51: error: Unsupported operand types for + ("List[str]" and "List[str]") [operator]
ignite (https://github.com/pytorch/ignite)
+ ignite/contrib/handlers/time_profilers.py:257: error: unused 'type: ignore' comment
pydantic (https://github.com/samuelcolvin/pydantic.git)
+ pydantic/color.py:199: error: unused 'type: ignore' comment
graphql-core (https://github.com/graphql-python/graphql-core.git)
+ src/graphql/type/validate.py:387: error: Unsupported operand types for + ("List[NamedTypeNode]" and "List[NamedTypeNode]")+ src/graphql/validation/rules/overlapping_fields_can_be_merged.py:81: error: Unsupported operand types for + ("List[FieldNode]" and "List[FieldNode]")
pandas (https://github.com/pandas-dev/pandas.git)
+ pandas/core/computation/scope.py:335: error: unused 'type: ignore' comment+ pandas/core/computation/scope.py:336: error: unused 'type: ignore' comment+ pandas/io/common.py:513: error: unused 'type: ignore' comment+ pandas/io/stata.py:909: error: unused 'type: ignore' comment+ pandas/io/pytables.py:3445: error: unused 'type: ignore' comment+ pandas/tests/reshape/concat/test_append.py:195: error: unused 'type: ignore' comment+ pandas/tests/frame/indexing/test_setitem.py:231: error: unused 'type: ignore' comment
paasta (https://github.com/yelp/paasta.git)
+ paasta_tools/config_utils.py:72: error: Unsupported operand types for + ("List[str]" and "List[str]")
tornado (https://github.com/tornadoweb/tornado.git)
+ tornado/autoreload.py:238: error: Unsupported operand types for + ("List[str]" and "List[str]") |
hauntsaninja
commented
Apr 28, 2021
Collaborator
Looks like we still have the weird This is definitely one for #1339 |
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 freeto 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.
I believe this type relaxation is sound, given that
__add__creates a new list, so should be equivalent to[*self, *x], which works like this.