re: Merge overloaded functions by using unions by not-my-profile · Pull Request #7349 · python/typeshed · GitHub
Skip to content

re: Merge overloaded functions by using unions - #7349

Closed
not-my-profile wants to merge 2 commits into
python:masterfrom
not-my-profile:re-merge-overloads
Closed

re: Merge overloaded functions by using unions#7349
not-my-profile wants to merge 2 commits into
python:masterfrom
not-my-profile:re-merge-overloads

Conversation

@not-my-profile

Copy link
Copy Markdown
Contributor

The signatures of these functions can also be modeled
without overloads using unions as parameter types.

While this shouldn't make any difference for type checking,
it improves the UX for people using IDEs because having to
cycle between subtly different function signatures isn't fun.

The signatures of these functions can also be modeled
without overloads using unions as parameter types.

While this shouldn't make any difference for type checking,
it improves the UX for people using IDEs because having to
cycle between subtly different function signatures isn't fun.
@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown
Contributor

@AlexWaygood

AlexWaygood commented Feb 22, 2022

Copy link
Copy Markdown
Member

See also:

Unfortunately, there's a number of mypy bugs regarding constrained TypeVars that make this hard to do right now, even though these functions probably should be typed like this ☹

@not-my-profile

Copy link
Copy Markdown
Contributor Author

Ah, well ... how unfortunate that mypy has such a limitation. I guess the tracking issue for that is python/mypy#11880?

@AlexWaygood

Copy link
Copy Markdown
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants