Skip to content

Commit 00f5240

Browse files
add more constants to tarfile (#3917)
1 parent 0503fb0 commit 00f5240

File tree

1 file changed

+38
-8
lines changed

1 file changed

+38
-8
lines changed

stdlib/2and3/tarfile.pyi

Lines changed: 38 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from typing import (
44
Callable, IO, Iterable, Iterator, List, Mapping, Optional, Type,
5-
Union,
5+
Union, Tuple, Dict, Set
66
)
77
import os
88
import sys
@@ -15,24 +15,54 @@ elif sys.version_info >= (3,):
1515
else:
1616
_Path = Union[str, unicode]
1717

18-
ENCODING: str
18+
# tar constants
19+
NUL: bytes
20+
BLOCKSIZE: int
21+
RECORDSIZE: int
22+
GNU_MAGIC: bytes
23+
POSIX_MAGIC: bytes
1924

20-
USTAR_FORMAT: int
21-
GNU_FORMAT: int
22-
PAX_FORMAT: int
23-
DEFAULT_FORMAT: int
25+
LENGTH_NAME: int
26+
LENGTH_LINK: int
27+
LENGTH_PREFIX: int
2428

2529
REGTYPE: bytes
2630
AREGTYPE: bytes
2731
LNKTYPE: bytes
2832
SYMTYPE: bytes
33+
CONTTYPE: bytes
34+
BLKTYPE: bytes
2935
DIRTYPE: bytes
3036
FIFOTYPE: bytes
31-
CONTTYPE: bytes
3237
CHRTYPE: bytes
33-
BLKTYPE: bytes
38+
39+
GNUTYPE_LONGNAME: bytes
40+
GNUTYPE_LONGLINK: bytes
3441
GNUTYPE_SPARSE: bytes
3542

43+
XHDTYPE: bytes
44+
XGLTYPE: bytes
45+
SOLARIS_XHDTYPE: bytes
46+
47+
USTAR_FORMAT: int
48+
GNU_FORMAT: int
49+
PAX_FORMAT: int
50+
DEFAULT_FORMAT: int
51+
52+
# tarfile constants
53+
54+
SUPPORTED_TYPES: Tuple[bytes, ...]
55+
REGULAR_TYPES: Tuple[bytes, ...]
56+
GNU_TYPES: Tuple[bytes, ...]
57+
PAX_FIELDS: Tuple[str, ...]
58+
PAX_NUMBER_FIELDS: Dict[str, type]
59+
60+
if sys.version_info >= (3,):
61+
PAX_NAME_FIELDS: Set[str]
62+
63+
64+
ENCODING: str
65+
3666
if sys.version_info < (3,):
3767
TAR_PLAIN: int
3868
TAR_GZIPPED: int

0 commit comments

Comments
 (0)