mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
Use explicit "# type: str" instead of '' shortcut.
This commit is contained in:
@@ -9,14 +9,14 @@ from typing import overload, List, Any, Tuple, BinaryIO, TextIO, TypeVar, Callab
|
||||
# ----- os.path variables -----
|
||||
supports_unicode_filenames = False
|
||||
# aliases (also in os)
|
||||
curdir = ''
|
||||
pardir = ''
|
||||
sep = ''
|
||||
altsep = ''
|
||||
extsep = ''
|
||||
pathsep = ''
|
||||
defpath = ''
|
||||
devnull = ''
|
||||
curdir = ... # type: str
|
||||
pardir = ... # type: str
|
||||
sep = ... # type: str
|
||||
altsep = ... # type: str
|
||||
extsep = ... # type: str
|
||||
pathsep = ... # type: str
|
||||
defpath = ... # type: str
|
||||
devnull = ... # type: str
|
||||
|
||||
# ----- os.path function stubs -----
|
||||
def abspath(path: AnyStr) -> AnyStr: ...
|
||||
|
||||
@@ -4,18 +4,18 @@
|
||||
|
||||
from typing import Mapping, Sequence, Any, Optional, Union, List, Tuple, Iterable, AnyStr
|
||||
|
||||
ascii_letters = ''
|
||||
ascii_lowercase = ''
|
||||
ascii_uppercase = ''
|
||||
digits = ''
|
||||
hexdigits = ''
|
||||
letters = ''
|
||||
lowercase = ''
|
||||
octdigits = ''
|
||||
punctuation = ''
|
||||
printable = ''
|
||||
uppercase = ''
|
||||
whitespace = ''
|
||||
ascii_letters = ... # type: str
|
||||
ascii_lowercase = ... # type: str
|
||||
ascii_uppercase = ... # type: str
|
||||
digits = ... # type: str
|
||||
hexdigits = ... # type: str
|
||||
letters = ... # type: str
|
||||
lowercase = ... # type: str
|
||||
octdigits = ... # type: str
|
||||
punctuation = ... # type: str
|
||||
printable = ... # type: str
|
||||
uppercase = ... # type: str
|
||||
whitespace = ... # type: str
|
||||
|
||||
def capwords(s: AnyStr, sep: AnyStr = None) -> AnyStr: ...
|
||||
# TODO: originally named 'from'
|
||||
@@ -49,7 +49,7 @@ def replace(s: AnyStr, old: AnyStr, new: AnyStr, maxreplace: int = None) -> AnyS
|
||||
|
||||
class Template(object):
|
||||
# TODO: Unicode support?
|
||||
template = ''
|
||||
template = ... # type: str
|
||||
|
||||
def __init__(self, template: str) -> None: ...
|
||||
def substitute(self, mapping: Mapping[str, str], **kwds: str) -> str: ...
|
||||
|
||||
@@ -26,8 +26,8 @@ STDOUT = ... # type: int
|
||||
|
||||
class CalledProcessError(Exception):
|
||||
returncode = 0
|
||||
cmd = ''
|
||||
output = '' # May be None
|
||||
cmd = ... # type: str
|
||||
output = ... # type: str # May be None
|
||||
|
||||
def __init__(self, returncode: int, cmd: str, output: str) -> None: ...
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
from typing import Tuple, IO
|
||||
|
||||
# global variables
|
||||
tempdir = ''
|
||||
template = ''
|
||||
tempdir = ... # type: str
|
||||
template = ... # type: str
|
||||
|
||||
# TODO text files
|
||||
|
||||
@@ -26,7 +26,7 @@ def SpooledTemporaryFile(
|
||||
...
|
||||
|
||||
class TemporaryDirectory:
|
||||
name = ''
|
||||
name = ... # type: str
|
||||
def __init__(self, suffix: str = '', prefix: str = 'tmp',
|
||||
dir: str = None) -> None: ...
|
||||
def cleanup(self) -> None: ...
|
||||
|
||||
@@ -10,7 +10,7 @@ def currentThread() -> Thread: ...
|
||||
def enumerate() -> List[Thread]: ...
|
||||
|
||||
class Thread(object):
|
||||
name = ''
|
||||
name = ... # type: str
|
||||
ident = 0
|
||||
daemon = False
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ uses_params = [] # type: List[str]
|
||||
non_hierarchical = [] # type: List[str]
|
||||
uses_query = [] # type: List[str]
|
||||
uses_fragment = [] # type: List[str]
|
||||
scheme_chars = ''
|
||||
scheme_chars = ... # type: str
|
||||
MAX_CACHE_SIZE = 0
|
||||
|
||||
def clear_cache() -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user