typing issue with __version_info__ += __parsed_version__.pre
See original GitHub issuemypy issue:
__version_info__ += __parsed_version__.pre
src/webargs/__init__.py:14: error: Unsupported operand types for + ("Tuple[int, ...]" and "Tuple[str, int]")
Not sure what the problem is. I’m tempted to just add a # type: ignore
. Any better idea, anyone?
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
"Could not parse version constraint dev" error on update with ...
My composer.json: { "name": "drupal/recommended-project", "description": "Project template for Drupal 8 projects with a relocated document ...
Read more >Build Helper Maven Plugin – Usage - MojoHaus
Access the parsed components of a project version. The parse-version goal can be used to access the component parts of a version string....
Read more >Version Handling - Packaging
version (str) – The version string to parse. Raises. InvalidVersion – When the version string is not a valid version. Return type. Version....
Read more >How can I tell Gitversion how to parse version from branch ...
For most part I can use the regex expression in the Gitversion.yml file so gitversion can properly identify the branch type. However, there...
Read more >Spring Into Kubernetes - Callibrity
To verify the cluster is running type the following command: minikube status ... mvnw build-helper:parse-version \.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
~Perhaps we could pin mypy to 0.910 in the meantime to avoid CI errors on unrelated PRs.~
Edit: In fact it is still pinned to 0.910 in dev branch as we haven’t merged #670 yet. I had it bumped to 0.930 through
pre-commit autoupdate
while working on #673. I just downgraded it in that branch to let tests pass.Edit 2: It is pinned in pre-commit config but not in tox in the dedicated mypy target. I sent #674 to pin it there too.
As detailed in the marshmallow PR, I had mixed up the semantics of
+
on tuples. (I thought it was vector addition, not concatenation.) So the code is correct, but we need to either annotate the version_info tuple astuple[str | int, ...]
or astuple[int, int, int] | tuple[int, int, int, str, int]
. I’ll continue to use the marshmallow PR to drive this, and we can just follow the decision we reach there.