-
Notifications
You must be signed in to change notification settings - Fork 41
Use Mypy #80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ecific treatment can happen without cluttering _url.py. Makes use of TYPE_CHECKING not add to the noise so much.
Codecov Report
@@ Coverage Diff @@
## master #80 +/- ##
=========================================
+ Coverage 98.18% 98.48% +0.3%
=========================================
Files 8 10 +2
Lines 1487 1521 +34
Branches 180 177 -3
=========================================
+ Hits 1460 1498 +38
+ Misses 13 12 -1
+ Partials 14 11 -3
Continue to review full report at Codecov.
|
|
I'll stop here and await review before continuing.
@mahmoud Again, codecov/patch is not passing here due to touching already-uncovered lines, which I think are best addressed separately. |
|
@glyph: FYI, I think this is up your alley. |
|
Indeed it is! First question: what about CI? :) |
|
@glyph I'd like a pass on The untested Windows code untested before (it just moved), and I think fixing that is orthogonal to this work. Same with the |
|
Seeing these windows troubles... a while back I had a branch or a gist or something that did the ip checking in regex. But the problem was that operating systems differed on what edge cases they thought were valid, and that might be expected behavior. The ol' 12 standards is better than 13, and so I left it. But if Windows is enough of a headache, I can dig it up... |
|
@mahmoud No, I think the current solution is fine. I'm just not in the give-a-crap-about Windows camp, and I think that a legit testing feature shouldn't block on an incomplete other testing feature. That said, I think I figured out a reasonable test for |
|
OK well I don't have a Windows box but I'm finding it surprising that the Windows tests are showing are covered but that the target code is not… In particular, I have a new test passing in Any ideas? |
|
Oh whoops |
|
Committed from my phone. Whoah. Go GitHub. |
|
OK it appears that src\hyperlink\test\test_socket.py 29 0 4 1 97% 8->exit
204 |
|
OK I think the issue is that So I've re-arranged the code to do our handling of |
|
Well OK that did it. All done. |
glyph
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great let's land it.
How do we get from here to shipping stubs?
mahmoud
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Just verifying, this seems to mostly be adding types to tests and some utilities. The core URL types still need typing added in future. Am I understanding that correctly?
|
@mahmoud: I started adding some type info to I'll start on more typing in a separate PR. You are correct; the most interesting type hints for clients are still to be done. They are also the less trivial, I think. Everything here is no-brainer-ish. @glyph: I think we should fixing the typing before we ship the type info. I don't think we'll be shipping stubs, and just using the inline type hints. It appears fairly straightforward, but I've only glanced through those docs. |
Oh, absolutely. Hence "LGTM" :).
Okay my understanding is that you need to build the stubs (and ship them) from the inline type hints, if you want 3rd party libraries to be able to use them. But then I only have the vaguest idea of how this all hangs together. What documentation are you referring to, outside the PEP? |
Let's take this to #81 |
No description provided.