Apply 'Add stub for pipes' patch from Ben Longbons.

This commit is contained in:
Matthias Kramm
2015-10-12 08:34:26 -07:00
parent 8754806bbf
commit ebb3f51f7b
2 changed files with 22 additions and 0 deletions

19
stdlib/3/pipes.pyi Normal file
View File

@@ -0,0 +1,19 @@
# Stubs for pipes
# Based on http://docs.python.org/3.5/library/pipes.html
import os
class Template:
def __init__(self) -> None: ...
def reset(self) -> None: ...
def clone(self) -> 'Template': ...
def debug(self, flag: bool) -> None: ...
def append(self, cmd: str, kind: str) -> None: ...
def prepend(self, cmd: str, kind: str) -> None: ...
def open(self, file: str, rw: str) -> os.popen: ...
def copy(self, file: str, rw: str) -> os.popen: ...
# Not documented, but widely used.
# Documented as shlex.quote since 3.3.
def quote(s: str) -> str: ...

View File

@@ -7,6 +7,9 @@ from typing import List, Tuple, Any, TextIO
def split(s: str, comments: bool = False,
posix: bool = True) -> List[str]: ...
# Added in 3.3, use (undocumented) pipes.quote in previous versions.
def quote(s: str) -> str: ...
class shlex:
commenters = ''
wordchars = ''