-
-
Notifications
You must be signed in to change notification settings - Fork 343
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
Enable flake8 annotations #3098
Changes from all commits
bdfffb6
acdb7b2
c05eaa6
9a56cb0
a7cdba5
3c880fb
76538d8
36ad522
4be420b
1399612
c4fccd0
f54f4d9
12fe034
8123b72
42be7f3
36b474f
1d7fd94
cf7df04
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,11 +85,11 @@ | |
|
||
elif os.name == "posix": | ||
|
||
def create_pipe_to_child_stdin(): | ||
def create_pipe_to_child_stdin() -> tuple[trio.lowlevel.FdStream, int]: | ||
rfd, wfd = os.pipe() | ||
return trio.lowlevel.FdStream(wfd), rfd | ||
|
||
def create_pipe_from_child_output(): | ||
def create_pipe_from_child_output() -> tuple[trio.lowlevel.FdStream, int]: | ||
rfd, wfd = os.pipe() | ||
return trio.lowlevel.FdStream(rfd), wfd | ||
|
||
|
@@ -106,12 +106,12 @@ | |
|
||
from .._windows_pipes import PipeReceiveStream, PipeSendStream | ||
|
||
def create_pipe_to_child_stdin(): | ||
def create_pipe_to_child_stdin() -> tuple[PipeSendStream, int]: | ||
# for stdin, we want the write end (our end) to use overlapped I/O | ||
rh, wh = windows_pipe(overlapped=(False, True)) | ||
return PipeSendStream(wh), msvcrt.open_osfhandle(rh, os.O_RDONLY) | ||
|
||
def create_pipe_from_child_output(): | ||
def create_pipe_from_child_output() -> tuple[PipeReceiveStream, int]: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. there's a mypy setting for catching this as well There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you are referring to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I meant There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. then why did this not get caught by mypy previously?? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not really sure |
||
# for stdout/err, it's the read end that's overlapped | ||
rh, wh = windows_pipe(overlapped=(True, False)) | ||
return PipeReceiveStream(rh), msvcrt.open_osfhandle(wh, 0) | ||
|
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.
whichever is merged latest of this and #3117 can remove these lines.