Skip to content

Remove some uses of overload - #665

Merged
JukkaL merged 2 commits into
python:masterfrom
refi64:stub-fixes
May 16, 2015
Merged

Remove some uses of overload#665
JukkaL merged 2 commits into
python:masterfrom
refi64:stub-fixes

Conversation

@refi64

@refi64 refi64 commented May 12, 2015

Copy link
Copy Markdown
Contributor

This fixes #432 and removes some other uses of @overload that were pretty simple.

@refi64
refi64 force-pushed the stub-fixes branch 2 times, most recently from e748deb to 4863d53 Compare May 12, 2015 15:49
@refi64

refi64 commented May 12, 2015

Copy link
Copy Markdown
Contributor Author

Yeah, I had a bunch of errors, too. I'm fixing them...

@refi64

refi64 commented May 14, 2015

Copy link
Copy Markdown
Contributor Author

What the heck? I think I managed to crash mypy!? Those Travis build results are screwed up...

Comment thread stubs/3.2/re.py Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think you're missing the return type here for Callable. I think this is causing the failing tests.

@spkersten

Copy link
Copy Markdown
Contributor

Of course, mypy shouldn't crash in this way as a result of a missing argument. I've made issue #673 for this.

@refi64

refi64 commented May 14, 2015

Copy link
Copy Markdown
Contributor Author

@spkersten Thanks! I didn't realize that!

What exactly do you mean by a default argument for string? re.sub doesn't have a default there...

@JukkaL

JukkaL commented May 15, 2015

Copy link
Copy Markdown
Collaborator

Wow, a single PR causing two mypy crashes! You found some code paths that don't have good test coverage.

Narrowed down the second crash: #674

Life is busy currently, but I'll try to find some time this week to debug the issue.

@JukkaL

JukkaL commented May 15, 2015

Copy link
Copy Markdown
Collaborator

Fixed #674. Started another build -- hopefully it passes now.

@spkersten

Copy link
Copy Markdown
Contributor

@kirbyfan64 You van ignore the comment about default for string. I was misreading the diff and thought that one of the original signatures didn't have the string argument.

@JukkaL

JukkaL commented May 16, 2015

Copy link
Copy Markdown
Collaborator

Looks good! Thanks for the PR!

JukkaL added a commit that referenced this pull request May 16, 2015
@JukkaL
JukkaL merged commit 5f5250e into python:master May 16, 2015
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.

Use typevar with values rather than overloading in 'struct' stubs

3 participants