Skip to content

Commit 4b0efd9

Browse files
jerubgvanrossum
authored andcommitted
Allow the first argument to SequenceMatcher.__init__ to be None. (#566)
1 parent 9de69f9 commit 4b0efd9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

stdlib/2.7/difflib.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66

77
from typing import (
88
TypeVar, Callable, Iterable, Iterator, List, NamedTuple, Sequence, Tuple,
9-
Generic
9+
Generic, Optional
1010
)
1111

1212
_T = TypeVar('_T')
1313

1414
class SequenceMatcher(Generic[_T]):
15-
def __init__(self, isjunk: Callable[[_T], bool] = ...,
15+
def __init__(self, isjunk: Optional[Callable[[_T], bool]] = ...,
1616
a: Sequence[_T] = ..., b: Sequence[_T] = ...,
1717
autojunk: bool = ...) -> None: ...
1818
def set_seqs(self, a: Sequence[_T], b: Sequence[_T]) -> None: ...

stdlib/3/difflib.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44

55
from typing import (
66
TypeVar, Callable, Iterable, Iterator, List, NamedTuple, Sequence, Tuple,
7-
Generic
7+
Generic, Optional
88
)
99

1010
_T = TypeVar('_T')
1111

1212
class SequenceMatcher(Generic[_T]):
13-
def __init__(self, isjunk: Callable[[_T], bool] = ...,
13+
def __init__(self, isjunk: Optional[Callable[[_T], bool]] = ...,
1414
a: Sequence[_T] = ..., b: Sequence[_T] = ...,
1515
autojunk: bool = ...) -> None: ...
1616
def set_seqs(self, a: Sequence[_T], b: Sequence[_T]) -> None: ...

0 commit comments

Comments
 (0)