diff --git a/stdlib/2and3/difflib.pyi b/stdlib/2and3/difflib.pyi index 407d563ef..5b285e070 100644 --- a/stdlib/2and3/difflib.pyi +++ b/stdlib/2and3/difflib.pyi @@ -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], diff --git a/tests/stubtest_whitelists/py3_common.txt b/tests/stubtest_whitelists/py3_common.txt index ebbab9c33..51ee9ff62 100644 --- a/tests/stubtest_whitelists/py3_common.txt +++ b/tests/stubtest_whitelists/py3_common.txt @@ -261,10 +261,7 @@ curses.textpad.Textbox.edit dbm.error dbm.ndbm decimal.DecimalException.handle -difflib.Differ.__init__ -difflib.HtmlDiff.__init__ difflib.SequenceMatcher.__init__ -difflib.ndiff dis.dis distutils.archive_util.make_archive distutils.archive_util.make_tarball