| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 8f94d9a commit 69c774e
8 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -417,9 +417,9 @@ class BaseEventLoop(AbstractEventLoop): | |||
| 417 | 417 | async def sock_connect(self, sock: socket, address: _Address) -> None: ... | |
| 418 | 418 | async def sock_accept(self, sock: socket) -> tuple[socket, _RetAddress]: ... | |
| 419 | 419 | if sys.version_info >= (3, 11): | |
| 420 | - async def sock_recvfrom(self, sock: socket, bufsize: int) -> bytes: ... | ||
| 421 | - async def sock_recvfrom_into(self, sock: socket, buf: WriteableBuffer, nbytes: int = 0) -> int: ... | ||
| 422 | - async def sock_sendto(self, sock: socket, data: ReadableBuffer, address: _Address) -> None: ... | ||
| 420 | + async def sock_recvfrom(self, sock: socket, bufsize: int) -> tuple[bytes, _RetAddress]: ... | ||
| 421 | + async def sock_recvfrom_into(self, sock: socket, buf: WriteableBuffer, nbytes: int = 0) -> tuple[int, _RetAddress]: ... | ||
| 422 | + async def sock_sendto(self, sock: socket, data: ReadableBuffer, address: _Address) -> int: ... | ||
| 423 | 423 | # Signal handling. | |
| 424 | 424 | def add_signal_handler(self, sig: int, callback: Callable[..., Any], *args: Any) -> None: ... | |
| 425 | 425 | def remove_signal_handler(self, sig: int) -> bool: ... | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -569,11 +569,11 @@ class AbstractEventLoop: | |||
| 569 | 569 | async def sock_accept(self, sock: socket) -> tuple[socket, _RetAddress]: ... | |
| 570 | 570 | if sys.version_info >= (3, 11): | |
| 571 | 571 | @abstractmethod | |
| 572 | - async def sock_recvfrom(self, sock: socket, bufsize: int) -> bytes: ... | ||
| 572 | + async def sock_recvfrom(self, sock: socket, bufsize: int) -> tuple[bytes, _RetAddress]: ... | ||
| 573 | 573 | @abstractmethod | |
| 574 | - async def sock_recvfrom_into(self, sock: socket, buf: WriteableBuffer, nbytes: int = 0) -> int: ... | ||
| 574 | + async def sock_recvfrom_into(self, sock: socket, buf: WriteableBuffer, nbytes: int = 0) -> tuple[int, _RetAddress]: ... | ||
| 575 | 575 | @abstractmethod | |
| 576 | - async def sock_sendto(self, sock: socket, data: ReadableBuffer, address: _Address) -> None: ... | ||
| 576 | + async def sock_sendto(self, sock: socket, data: ReadableBuffer, address: _Address) -> int: ... | ||
| 577 | 577 | # Signal handling. | |
| 578 | 578 | @abstractmethod | |
| 579 | 579 | def add_signal_handler(self, sig: int, callback: Callable[..., object], *args: Any) -> None: ... | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -247,7 +247,27 @@ class InitVar(Generic[_T], metaclass=_InitVarMeta): | |||
| 247 | 247 | @overload | |
| 248 | 248 | def __class_getitem__(cls, type: Any) -> InitVar[Any]: ... | |
| 249 | 249 | ||
| 250 | - if sys.version_info >= (3, 11): | ||
| 250 | + if sys.version_info >= (3, 12): | ||
| 251 | + def make_dataclass( | ||
| 252 | + cls_name: str, | ||
| 253 | + fields: Iterable[str | tuple[str, type] | tuple[str, type, Any]], | ||
| 254 | + *, | ||
| 255 | + bases: tuple[type, ...] = (), | ||
| 256 | + namespace: dict[str, Any] | None = None, | ||
| 257 | + init: bool = True, | ||
| 258 | + repr: bool = True, | ||
| 259 | + eq: bool = True, | ||
| 260 | + order: bool = False, | ||
| 261 | + unsafe_hash: bool = False, | ||
| 262 | + frozen: bool = False, | ||
| 263 | + match_args: bool = True, | ||
| 264 | + kw_only: bool = False, | ||
| 265 | + slots: bool = False, | ||
| 266 | + weakref_slot: bool = False, | ||
| 267 | + module: str | None = None, | ||
| 268 | + ) -> type: ... | ||
| 269 | + | ||
| 270 | + elif sys.version_info >= (3, 11): | ||
| 251 | 271 | def make_dataclass( | |
| 252 | 272 | cls_name: str, | |
| 253 | 273 | fields: Iterable[str | tuple[str, type] | tuple[str, type, Any]], | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -173,9 +173,9 @@ class Path(PurePath): | |||
| 173 | 173 | def resolve(self, strict: bool = False) -> Self: ... | |
| 174 | 174 | def rglob(self, pattern: str) -> Generator[Self, None, None]: ... | |
| 175 | 175 | def rmdir(self) -> None: ... | |
| 176 | - def symlink_to(self, target: str | Path, target_is_directory: bool = False) -> None: ... | ||
| 176 | + def symlink_to(self, target: StrOrBytesPath, target_is_directory: bool = False) -> None: ... | ||
| 177 | 177 | if sys.version_info >= (3, 10): | |
| 178 | - def hardlink_to(self, target: str | Path) -> None: ... | ||
| 178 | + def hardlink_to(self, target: StrOrBytesPath) -> None: ... | ||
| 179 | 179 | ||
| 180 | 180 | def touch(self, mode: int = 0o666, exist_ok: bool = True) -> None: ... | |
| 181 | 181 | if sys.version_info >= (3, 8): | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -201,6 +201,20 @@ class _int_info(structseq[int], tuple[int, int, int, int]): | |||
| 201 | 201 | @property | |
| 202 | 202 | def str_digits_check_threshold(self) -> int: ... | |
| 203 | 203 | ||
| 204 | + _ThreadInfoName: TypeAlias = Literal["nt", "pthread", "pthread-stubs", "solaris"] | ||
| 205 | + _ThreadInfoLock: TypeAlias = Literal["semaphore", "mutex+cond"] | None | ||
| 206 | + | ||
| 207 | + @final | ||
| 208 | + class _thread_info(_UninstantiableStructseq, tuple[_ThreadInfoName, _ThreadInfoLock, str | None]): | ||
| 209 | + @property | ||
| 210 | + def name(self) -> _ThreadInfoName: ... | ||
| 211 | + @property | ||
| 212 | + def lock(self) -> _ThreadInfoLock: ... | ||
| 213 | + @property | ||
| 214 | + def version(self) -> str | None: ... | ||
| 215 | + | ||
| 216 | + thread_info: _thread_info | ||
| 217 | + | ||
| 204 | 218 | @final | |
| 205 | 219 | class _version_info(_UninstantiableStructseq, tuple[int, int, int, str, int]): | |
| 206 | 220 | @property | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1234,16 +1234,16 @@ class Canvas(Widget, XView, YView): | |||
| 1234 | 1234 | __x1: float, | |
| 1235 | 1235 | __y1: float, | |
| 1236 | 1236 | *, | |
| 1237 | - activedash: str | list[int] | tuple[int, ...] = ..., | ||
| 1237 | + activedash: str | int | list[int] | tuple[int, ...] = ..., | ||
| 1238 | 1238 | activefill: str = ..., | |
| 1239 | 1239 | activestipple: str = ..., | |
| 1240 | 1240 | activewidth: _ScreenUnits = ..., | |
| 1241 | 1241 | arrow: Literal["first", "last", "both"] = ..., | |
| 1242 | 1242 | arrowshape: tuple[float, float, float] = ..., | |
| 1243 | 1243 | capstyle: Literal["round", "projecting", "butt"] = ..., | |
| 1244 | - dash: str | list[int] | tuple[int, ...] = ..., | ||
| 1244 | + dash: str | int | list[int] | tuple[int, ...] = ..., | ||
| 1245 | 1245 | dashoffset: _ScreenUnits = ..., | |
| 1246 | - disableddash: str | list[int] | tuple[int, ...] = ..., | ||
| 1246 | + disableddash: str | int | list[int] | tuple[int, ...] = ..., | ||
| 1247 | 1247 | disabledfill: str = ..., | |
| 1248 | 1248 | disabledstipple: str = ..., | |
| 1249 | 1249 | disabledwidth: _ScreenUnits = ..., | |
@@ -1263,16 +1263,16 @@ class Canvas(Widget, XView, YView): | |||
| 1263 | 1263 | __xy_pair_0: tuple[float, float], | |
| 1264 | 1264 | __xy_pair_1: tuple[float, float], | |
| 1265 | 1265 | *, | |
| 1266 | - activedash: str | list[int] | tuple[int, ...] = ..., | ||
| 1266 | + activedash: str | int | list[int] | tuple[int, ...] = ..., | ||
| 1267 | 1267 | activefill: str = ..., | |
| 1268 | 1268 | activestipple: str = ..., | |
| 1269 | 1269 | activewidth: _ScreenUnits = ..., | |
| 1270 | 1270 | arrow: Literal["first", "last", "both"] = ..., | |
| 1271 | 1271 | arrowshape: tuple[float, float, float] = ..., | |
| 1272 | 1272 | capstyle: Literal["round", "projecting", "butt"] = ..., | |
| 1273 | - dash: str | list[int] | tuple[int, ...] = ..., | ||
| 1273 | + dash: str | int | list[int] | tuple[int, ...] = ..., | ||
| 1274 | 1274 | dashoffset: _ScreenUnits = ..., | |
| 1275 | - disableddash: str | list[int] | tuple[int, ...] = ..., | ||
| 1275 | + disableddash: str | int | list[int] | tuple[int, ...] = ..., | ||
| 1276 | 1276 | disabledfill: str = ..., | |
| 1277 | 1277 | disabledstipple: str = ..., | |
| 1278 | 1278 | disabledwidth: _ScreenUnits = ..., | |
@@ -1298,16 +1298,16 @@ class Canvas(Widget, XView, YView): | |||
| 1298 | 1298 | | list[tuple[float, float]] | |
| 1299 | 1299 | ), | |
| 1300 | 1300 | *, | |
| 1301 | - activedash: str | list[int] | tuple[int, ...] = ..., | ||
| 1301 | + activedash: str | int | list[int] | tuple[int, ...] = ..., | ||
| 1302 | 1302 | activefill: str = ..., | |
| 1303 | 1303 | activestipple: str = ..., | |
| 1304 | 1304 | activewidth: _ScreenUnits = ..., | |
| 1305 | 1305 | arrow: Literal["first", "last", "both"] = ..., | |
| 1306 | 1306 | arrowshape: tuple[float, float, float] = ..., | |
| 1307 | 1307 | capstyle: Literal["round", "projecting", "butt"] = ..., | |
| 1308 | - dash: str | list[int] | tuple[int, ...] = ..., | ||
| 1308 | + dash: str | int | list[int] | tuple[int, ...] = ..., | ||
| 1309 | 1309 | dashoffset: _ScreenUnits = ..., | |
| 1310 | - disableddash: str | list[int] | tuple[int, ...] = ..., | ||
| 1310 | + disableddash: str | int | list[int] | tuple[int, ...] = ..., | ||
| 1311 | 1311 | disabledfill: str = ..., | |
| 1312 | 1312 | disabledstipple: str = ..., | |
| 1313 | 1313 | disabledwidth: _ScreenUnits = ..., | |
@@ -1329,15 +1329,15 @@ class Canvas(Widget, XView, YView): | |||
| 1329 | 1329 | __x1: float, | |
| 1330 | 1330 | __y1: float, | |
| 1331 | 1331 | *, | |
| 1332 | - activedash: str | list[int] | tuple[int, ...] = ..., | ||
| 1332 | + activedash: str | int | list[int] | tuple[int, ...] = ..., | ||
| 1333 | 1333 | activefill: str = ..., | |
| 1334 | 1334 | activeoutline: str = ..., | |
| 1335 | 1335 | activeoutlinestipple: str = ..., | |
| 1336 | 1336 | activestipple: str = ..., | |
| 1337 | 1337 | activewidth: _ScreenUnits = ..., | |
| 1338 | - dash: str | list[int] | tuple[int, ...] = ..., | ||
| 1338 | + dash: str | int | list[int] | tuple[int, ...] = ..., | ||
| 1339 | 1339 | dashoffset: _ScreenUnits = ..., | |
| 1340 | - disableddash: str | list[int] | tuple[int, ...] = ..., | ||
| 1340 | + disableddash: str | int | list[int] | tuple[int, ...] = ..., | ||
| 1341 | 1341 | disabledfill: str = ..., | |
| 1342 | 1342 | disabledoutline: str = ..., | |
| 1343 | 1343 | disabledoutlinestipple: str = ..., | |
@@ -1359,15 +1359,15 @@ class Canvas(Widget, XView, YView): | |||
| 1359 | 1359 | __xy_pair_0: tuple[float, float], | |
| 1360 | 1360 | __xy_pair_1: tuple[float, float], | |
| 1361 | 1361 | *, | |
| 1362 | - activedash: str | list[int] | tuple[int, ...] = ..., | ||
| 1362 | + activedash: str | int | list[int] | tuple[int, ...] = ..., | ||
| 1363 | 1363 | activefill: str = ..., | |
| 1364 | 1364 | activeoutline: str = ..., | |
| 1365 | 1365 | activeoutlinestipple: str = ..., | |
| 1366 | 1366 | activestipple: str = ..., | |
| 1367 | 1367 | activewidth: _ScreenUnits = ..., | |
| 1368 | - dash: str | list[int] | tuple[int, ...] = ..., | ||
| 1368 | + dash: str | int | list[int] | tuple[int, ...] = ..., | ||
| 1369 | 1369 | dashoffset: _ScreenUnits = ..., | |
| 1370 | - disableddash: str | list[int] | tuple[int, ...] = ..., | ||
| 1370 | + disableddash: str | int | list[int] | tuple[int, ...] = ..., | ||
| 1371 | 1371 | disabledfill: str = ..., | |
| 1372 | 1372 | disabledoutline: str = ..., | |
| 1373 | 1373 | disabledoutlinestipple: str = ..., | |
@@ -1395,15 +1395,15 @@ class Canvas(Widget, XView, YView): | |||
| 1395 | 1395 | | list[tuple[float, float]] | |
| 1396 | 1396 | ), | |
| 1397 | 1397 | *, | |
| 1398 | - activedash: str | list[int] | tuple[int, ...] = ..., | ||
| 1398 | + activedash: str | int | list[int] | tuple[int, ...] = ..., | ||
| 1399 | 1399 | activefill: str = ..., | |
| 1400 | 1400 | activeoutline: str = ..., | |
| 1401 | 1401 | activeoutlinestipple: str = ..., | |
| 1402 | 1402 | activestipple: str = ..., | |
| 1403 | 1403 | activewidth: _ScreenUnits = ..., | |
| 1404 | - dash: str | list[int] | tuple[int, ...] = ..., | ||
| 1404 | + dash: str | int | list[int] | tuple[int, ...] = ..., | ||
| 1405 | 1405 | dashoffset: _ScreenUnits = ..., | |
| 1406 | - disableddash: str | list[int] | tuple[int, ...] = ..., | ||
| 1406 | + disableddash: str | int | list[int] | tuple[int, ...] = ..., | ||
| 1407 | 1407 | disabledfill: str = ..., | |
| 1408 | 1408 | disabledoutline: str = ..., | |
| 1409 | 1409 | disabledoutlinestipple: str = ..., | |
@@ -1427,15 +1427,15 @@ class Canvas(Widget, XView, YView): | |||
| 1427 | 1427 | __x1: float, | |
| 1428 | 1428 | __y1: float, | |
| 1429 | 1429 | *xy_pairs: float, | |
| 1430 | - activedash: str | list[int] | tuple[int, ...] = ..., | ||
| 1430 | + activedash: str | int | list[int] | tuple[int, ...] = ..., | ||
| 1431 | 1431 | activefill: str = ..., | |
| 1432 | 1432 | activeoutline: str = ..., | |
| 1433 | 1433 | activeoutlinestipple: str = ..., | |
| 1434 | 1434 | activestipple: str = ..., | |
| 1435 | 1435 | activewidth: _ScreenUnits = ..., | |
| 1436 | - dash: str | list[int] | tuple[int, ...] = ..., | ||
| 1436 | + dash: str | int | list[int] | tuple[int, ...] = ..., | ||
| 1437 | 1437 | dashoffset: _ScreenUnits = ..., | |
| 1438 | - disableddash: str | list[int] | tuple[int, ...] = ..., | ||
| 1438 | + disableddash: str | int | list[int] | tuple[int, ...] = ..., | ||
| 1439 | 1439 | disabledfill: str = ..., | |
| 1440 | 1440 | disabledoutline: str = ..., | |
| 1441 | 1441 | disabledoutlinestipple: str = ..., | |
@@ -1460,15 +1460,15 @@ class Canvas(Widget, XView, YView): | |||
| 1460 | 1460 | __xy_pair_0: tuple[float, float], | |
| 1461 | 1461 | __xy_pair_1: tuple[float, float], | |
| 1462 | 1462 | *xy_pairs: tuple[float, float], | |
| 1463 | - activedash: str | list[int] | tuple[int, ...] = ..., | ||
| 1463 | + activedash: str | int | list[int] | tuple[int, ...] = ..., | ||
| 1464 | 1464 | activefill: str = ..., | |
| 1465 | 1465 | activeoutline: str = ..., | |
| 1466 | 1466 | activeoutlinestipple: str = ..., | |
| 1467 | 1467 | activestipple: str = ..., | |
| 1468 | 1468 | activewidth: _ScreenUnits = ..., | |
| 1469 | - dash: str | list[int] | tuple[int, ...] = ..., | ||
| 1469 | + dash: str | int | list[int] | tuple[int, ...] = ..., | ||
| 1470 | 1470 | dashoffset: _ScreenUnits = ..., | |
| 1471 | - disableddash: str | list[int] | tuple[int, ...] = ..., | ||
| 1471 | + disableddash: str | int | list[int] | tuple[int, ...] = ..., | ||
| 1472 | 1472 | disabledfill: str = ..., | |
| 1473 | 1473 | disabledoutline: str = ..., | |
| 1474 | 1474 | disabledoutlinestipple: str = ..., | |
@@ -1499,15 +1499,15 @@ class Canvas(Widget, XView, YView): | |||
| 1499 | 1499 | | list[tuple[float, float]] | |
| 1500 | 1500 | ), | |
| 1501 | 1501 | *, | |
| 1502 | - activedash: str | list[int] | tuple[int, ...] = ..., | ||
| 1502 | + activedash: str | int | list[int] | tuple[int, ...] = ..., | ||
| 1503 | 1503 | activefill: str = ..., | |
| 1504 | 1504 | activeoutline: str = ..., | |
| 1505 | 1505 | activeoutlinestipple: str = ..., | |
| 1506 | 1506 | activestipple: str = ..., | |
| 1507 | 1507 | activewidth: _ScreenUnits = ..., | |
| 1508 | - dash: str | list[int] | tuple[int, ...] = ..., | ||
| 1508 | + dash: str | int | list[int] | tuple[int, ...] = ..., | ||
| 1509 | 1509 | dashoffset: _ScreenUnits = ..., | |
| 1510 | - disableddash: str | list[int] | tuple[int, ...] = ..., | ||
| 1510 | + disableddash: str | int | list[int] | tuple[int, ...] = ..., | ||
| 1511 | 1511 | disabledfill: str = ..., | |
| 1512 | 1512 | disabledoutline: str = ..., | |
| 1513 | 1513 | disabledoutlinestipple: str = ..., | |
@@ -1534,15 +1534,15 @@ class Canvas(Widget, XView, YView): | |||
| 1534 | 1534 | __x1: float, | |
| 1535 | 1535 | __y1: float, | |
| 1536 | 1536 | *, | |
| 1537 | - activedash: str | list[int] | tuple[int, ...] = ..., | ||
| 1537 | + activedash: str | int | list[int] | tuple[int, ...] = ..., | ||
| 1538 | 1538 | activefill: str = ..., | |
| 1539 | 1539 | activeoutline: str = ..., | |
| 1540 | 1540 | activeoutlinestipple: str = ..., | |
| 1541 | 1541 | activestipple: str = ..., | |
| 1542 | 1542 | activewidth: _ScreenUnits = ..., | |
| 1543 | - dash: str | list[int] | tuple[int, ...] = ..., | ||
| 1543 | + dash: str | int | list[int] | tuple[int, ...] = ..., | ||
| 1544 | 1544 | dashoffset: _ScreenUnits = ..., | |
| 1545 | - disableddash: str | list[int] | tuple[int, ...] = ..., | ||
| 1545 | + disableddash: str | int | list[int] | tuple[int, ...] = ..., | ||
| 1546 | 1546 | disabledfill: str = ..., | |
| 1547 | 1547 | disabledoutline: str = ..., | |
| 1548 | 1548 | disabledoutlinestipple: str = ..., | |
@@ -1564,15 +1564,15 @@ class Canvas(Widget, XView, YView): | |||
| 1564 | 1564 | __xy_pair_0: tuple[float, float], | |
| 1565 | 1565 | __xy_pair_1: tuple[float, float], | |
| 1566 | 1566 | *, | |
| 1567 | - activedash: str | list[int] | tuple[int, ...] = ..., | ||
| 1567 | + activedash: str | int | list[int] | tuple[int, ...] = ..., | ||
| 1568 | 1568 | activefill: str = ..., | |
| 1569 | 1569 | activeoutline: str = ..., | |
| 1570 | 1570 | activeoutlinestipple: str = ..., | |
| 1571 | 1571 | activestipple: str = ..., | |
| 1572 | 1572 | activewidth: _ScreenUnits = ..., | |
| 1573 | - dash: str | list[int] | tuple[int, ...] = ..., | ||
| 1573 | + dash: str | int | list[int] | tuple[int, ...] = ..., | ||
| 1574 | 1574 | dashoffset: _ScreenUnits = ..., | |
| 1575 | - disableddash: str | list[int] | tuple[int, ...] = ..., | ||
| 1575 | + disableddash: str | int | list[int] | tuple[int, ...] = ..., | ||
| 1576 | 1576 | disabledfill: str = ..., | |
| 1577 | 1577 | disabledoutline: str = ..., | |
| 1578 | 1578 | disabledoutlinestipple: str = ..., | |
@@ -1600,15 +1600,15 @@ class Canvas(Widget, XView, YView): | |||
| 1600 | 1600 | | list[tuple[float, float]] | |
| 1601 | 1601 | ), | |
| 1602 | 1602 | *, | |
| 1603 | - activedash: str | list[int] | tuple[int, ...] = ..., | ||
| 1603 | + activedash: str | int | list[int] | tuple[int, ...] = ..., | ||
| 1604 | 1604 | activefill: str = ..., | |
| 1605 | 1605 | activeoutline: str = ..., | |
| 1606 | 1606 | activeoutlinestipple: str = ..., | |
| 1607 | 1607 | activestipple: str = ..., | |
| 1608 | 1608 | activewidth: _ScreenUnits = ..., | |
| 1609 | - dash: str | list[int] | tuple[int, ...] = ..., | ||
| 1609 | + dash: str | int | list[int] | tuple[int, ...] = ..., | ||
| 1610 | 1610 | dashoffset: _ScreenUnits = ..., | |
| 1611 | - disableddash: str | list[int] | tuple[int, ...] = ..., | ||
| 1611 | + disableddash: str | int | list[int] | tuple[int, ...] = ..., | ||
| 1612 | 1612 | disabledfill: str = ..., | |
| 1613 | 1613 | disabledoutline: str = ..., | |
| 1614 | 1614 | disabledoutlinestipple: str = ..., | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -196,14 +196,15 @@ else: | |||
| 196 | 196 | url: bytes | bytearray | None, scheme: bytes | bytearray | None | Literal[""] = "", allow_fragments: bool = True | |
| 197 | 197 | ) -> SplitResultBytes: ... | |
| 198 | 198 | ||
| 199 | + # Requires an iterable of length 6 | ||
| 199 | 200 | @overload | |
| 200 | - def urlunparse( | ||
| 201 | - components: tuple[AnyStr | None, AnyStr | None, AnyStr | None, AnyStr | None, AnyStr | None, AnyStr | None] | ||
| 202 | - ) -> AnyStr: ... | ||
| 201 | + def urlunparse(components: Iterable[None]) -> Literal[b""]: ... | ||
| 203 | 202 | @overload | |
| 204 | - def urlunparse(components: Sequence[AnyStr | None]) -> AnyStr: ... | ||
| 203 | + def urlunparse(components: Iterable[AnyStr | None]) -> AnyStr: ... | ||
| 204 | + | ||
| 205 | + # Requires an iterable of length 5 | ||
| 205 | 206 | @overload | |
| 206 | - def urlunsplit(components: tuple[AnyStr | None, AnyStr | None, AnyStr | None, AnyStr | None, AnyStr | None]) -> AnyStr: ... | ||
| 207 | + def urlunsplit(components: Iterable[None]) -> Literal[b""]: ... | ||
| 207 | 208 | @overload | |
| 208 | - def urlunsplit(components: Sequence[AnyStr | None]) -> AnyStr: ... | ||
| 209 | + def urlunsplit(components: Iterable[AnyStr | None]) -> AnyStr: ... | ||
| 209 | 210 | def unwrap(url: str) -> str: ... | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -222,10 +222,11 @@ class ZipInfo: | |||
| 222 | 222 | def is_dir(self) -> bool: ... | |
| 223 | 223 | def FileHeader(self, zip64: bool | None = None) -> bytes: ... | |
| 224 | 224 | ||
| 225 | - class _PathOpenProtocol(Protocol): | ||
| 226 | - def __call__(self, mode: _ReadWriteMode = ..., pwd: bytes | None = ..., *, force_zip64: bool = ...) -> IO[bytes]: ... | ||
| 227 | - | ||
| 228 | 225 | if sys.version_info >= (3, 8): | |
| 226 | + if sys.version_info < (3, 9): | ||
| 227 | + class _PathOpenProtocol(Protocol): | ||
| 228 | + def __call__(self, mode: _ReadWriteMode = "r", pwd: bytes | None = ..., *, force_zip64: bool = ...) -> IO[bytes]: ... | ||
| 229 | + | ||
| 229 | 230 | class Path: | |
| 230 | 231 | @property | |
| 231 | 232 | def name(self) -> str: ... | |
@@ -245,7 +246,12 @@ if sys.version_info >= (3, 8): | |||
| 245 | 246 | def __init__(self, root: ZipFile | StrPath | IO[bytes], at: str = "") -> None: ... | |
| 246 | 247 | if sys.version_info >= (3, 9): | |
| 247 | 248 | def open( | |
| 248 | - self, mode: _ReadWriteBinaryMode = "r", *args: Any, pwd: bytes | None = None, **kwargs: Any | ||
| 249 | + self, | ||
| 250 | + mode: _ReadWriteBinaryMode = "r", | ||
| 251 | + encoding: str | None = None, | ||
| 252 | + *args: Any, | ||
| 253 | + pwd: bytes | None = None, | ||
| 254 | + **kwargs: Any, | ||
| 249 | 255 | ) -> IO[bytes]: ... | |
| 250 | 256 | else: | |
| 251 | 257 | @property | |
| Back | FazBrowse Home | New Git URL |
0 commit comments