mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Add missing Optional to str.split and socket.socket. (#504)
* Add Optional to str.split and friends * Python 3: Make fileno arg of socket.socket Optional Python 2: Remove fileno arg of socket.socket
This commit is contained in:
committed by
Guido van Rossum
parent
828f42e350
commit
5e5b3726f2
@@ -5,7 +5,7 @@
|
||||
# see: http://hg.python.org/cpython/file/3d0686d90f55/Lib/socket.py
|
||||
# see: http://nullege.com/codes/search/socket
|
||||
|
||||
from typing import Any, Tuple, Union, List, overload
|
||||
from typing import Any, Tuple, List, Optional, Union, overload
|
||||
|
||||
# ----- variables and constants -----
|
||||
|
||||
@@ -277,7 +277,7 @@ class socket:
|
||||
proto = 0
|
||||
|
||||
def __init__(self, family: int = ..., type: int = ...,
|
||||
proto: int = ..., fileno: int = ...) -> None: ...
|
||||
proto: int = ..., fileno: Optional[int] = ...) -> None: ...
|
||||
|
||||
# --- methods ---
|
||||
# second tuple item is an address
|
||||
|
||||
Reference in New Issue
Block a user