difflib: fix various types (#3755)

This commit is contained in:
Shantanu
2020-02-21 21:20:15 -08:00
committed by GitHub
parent d8d755d054
commit d104386b40
2 changed files with 6 additions and 9 deletions

View File

@@ -42,7 +42,7 @@ def get_close_matches(word: Sequence[_T], possibilities: Iterable[Sequence[_T]],
n: int = ..., cutoff: float = ...) -> List[Sequence[_T]]: ...
class Differ:
def __init__(self, linejunk: _JunkCallback = ..., charjunk: _JunkCallback = ...) -> None: ...
def __init__(self, linejunk: Optional[_JunkCallback] = ..., charjunk: Optional[_JunkCallback] = ...) -> None: ...
def compare(self, a: Sequence[_StrType], b: Sequence[_StrType]) -> Iterator[_StrType]: ...
def IS_LINE_JUNK(line: _StrType, pat: Any = ...) -> bool: ... # pat is undocumented
@@ -54,14 +54,14 @@ def context_diff(a: Sequence[_StrType], b: Sequence[_StrType], fromfile: _StrTyp
tofile: _StrType = ..., fromfiledate: _StrType = ..., tofiledate: _StrType = ...,
n: int = ..., lineterm: _StrType = ...) -> Iterator[_StrType]: ...
def ndiff(a: Sequence[_StrType], b: Sequence[_StrType],
linejunk: _JunkCallback = ...,
charjunk: _JunkCallback = ...
linejunk: Optional[_JunkCallback] = ...,
charjunk: Optional[_JunkCallback] = ...
) -> Iterator[_StrType]: ...
class HtmlDiff(object):
def __init__(self, tabsize: int = ..., wrapcolumn: int = ...,
linejunk: _JunkCallback = ...,
charjunk: _JunkCallback = ...
def __init__(self, tabsize: int = ..., wrapcolumn: Optional[int] = ...,
linejunk: Optional[_JunkCallback] = ...,
charjunk: Optional[_JunkCallback] = ...
) -> None: ...
if sys.version_info >= (3, 5):
def make_file(self, fromlines: Sequence[_StrType], tolines: Sequence[_StrType],