8000 Accept `socket.socket` in fcntl functions by dfarley1 · Pull Request #3582 · python/typeshed · GitHub
[go: up one dir, main page]

Skip to content

Accept socket.socket in fcntl functions #3582

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion stdlib/3/fcntl.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Stubs for fcntl
from io import IOBase
from socket import socket
from typing import Any, IO, Union

FASYNC: int
Expand Down Expand Up @@ -75,7 +76,7 @@ LOCK_SH: int
LOCK_UN: int
LOCK_WRITE: int

_AnyFile = Union[int, IO[Any], IOBase]
_AnyFile = Union[int, IO[Any], IOBase, socket]

# TODO All these return either int or bytes depending on the value of
# cmd (not on the type of arg).
Expand Down
0