question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

typing issue with __version_info__ += __parsed_version__.pre

See original GitHub issue

mypy 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:closed
  • Created 2 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
lafrechcommented, Jan 2, 2022

~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.

1reaction
sirosencommented, Dec 20, 2021

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 as tuple[str | int, ...] or as tuple[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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found