FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Improve min/max by kaste · Pull Request #2833 · python/typeshed · GitHub

Repository navigation

Improve min/max - #2833

Merged
srittau merged 4 commits into
python:masterfrom
kaste:improve-min-max
Mar 8, 2019
Merged

srittau merged 4 commits into
python:masterfrom
kaste:improve-min-max

Conversation

kaste commented Mar 8, 2019

Copy link
Copy Markdown
Contributor

Probably mildly clear if you provide a default value for min/max builtins the return type becomes a 'Union'.

I don't know if that's too much but I also added two other commits (you squash anyway, cherry-pick) because in the recent mypy we can mark positional args via '_' and of course kw only args via '*'.

I didn't find tests. It's also really hard to write this without typos because it's so ... dense. 🤞 hope it helps.

Fixes python/mypy#6460

kaste changed the title Improve min max Improve min/max Mar 8, 2019

srittau left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Good fix!

srittau merged commit 4dcd516 into python:master Mar 8, 2019
kaste deleted the improve-min-max branch March 8, 2019 19:12
msullivan added a commit that referenced this pull request Mar 25, 2019
PR #2833 introduced more flexible handling for the type of the default
parameter, but the extra type variable caused some issues. Add another
overload for the case where there is no default param.

This is I think related to the issues we have had with `get` recently?
msullivan added a commit that referenced this pull request Mar 25, 2019
PR #2833 introduced more flexible handling for the type of the default
parameter, but the extra type variable caused some issues. Add another
overload for the case where there is no default param.

This is I think related to the issues we have had with `get` recently?
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL