Skip to content

Commit 2551b76

Browse files
x3k6a2JelleZijlstra
authored andcommitted
Replace default strings ' ' with ... (#1721)
This fixes a problem with pytype.
1 parent f933b93 commit 2551b76

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

stdlib/3/builtins.pyi

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ class str(Sequence[str]):
238238

239239
def capitalize(self) -> str: ...
240240
def casefold(self) -> str: ...
241-
def center(self, width: int, fillchar: str = ' ') -> str: ...
241+
def center(self, width: int, fillchar: str = ...) -> str: ...
242242
def count(self, x: str, __start: Optional[int] = ..., __end: Optional[int] = ...) -> int: ...
243243
def encode(self, encoding: str = 'utf-8', errors: str = 'strict') -> bytes: ...
244244
def endswith(self, suffix: Union[str, Tuple[str, ...]], start: Optional[int] = None,
@@ -260,14 +260,14 @@ class str(Sequence[str]):
260260
def istitle(self) -> bool: ...
261261
def isupper(self) -> bool: ...
262262
def join(self, iterable: Iterable[str]) -> str: ...
263-
def ljust(self, width: int, fillchar: str = ' ') -> str: ...
263+
def ljust(self, width: int, fillchar: str = ...) -> str: ...
264264
def lower(self) -> str: ...
265265
def lstrip(self, chars: Optional[str] = None) -> str: ...
266266
def partition(self, sep: str) -> Tuple[str, str, str]: ...
267267
def replace(self, old: str, new: str, count: int = -1) -> str: ...
268268
def rfind(self, sub: str, __start: Optional[int] = ..., __end: Optional[int] = ...) -> int: ...
269269
def rindex(self, sub: str, __start: Optional[int] = ..., __end: Optional[int] = ...) -> int: ...
270-
def rjust(self, width: int, fillchar: str = ' ') -> str: ...
270+
def rjust(self, width: int, fillchar: str = ...) -> str: ...
271271
def rpartition(self, sep: str) -> Tuple[str, str, str]: ...
272272
def rsplit(self, sep: Optional[str] = None, maxsplit: int = -1) -> List[str]: ...
273273
def rstrip(self, chars: Optional[str] = None) -> str: ...
@@ -782,7 +782,7 @@ def filter(function: Optional[Callable[[_T], Any]],
782782
iterable: Iterable[_T]) -> Iterator[_T]: ...
783783
@overload
784784
def filter(function: None, iterable: Iterable[Optional[_T]]) -> Iterator[_T]: ...
785-
def format(o: object, format_spec: str = '') -> str: ...
785+
def format(o: object, format_spec: str = ...) -> str: ...
786786
def getattr(o: Any, name: str, default: Any = ...) -> Any: ...
787787
def globals() -> Dict[str, Any]: ...
788788
def hasattr(o: Any, name: str) -> bool: ...
@@ -834,7 +834,7 @@ else:
834834

835835
def ord(c: Union[str, bytes, bytearray]) -> int: ...
836836
# TODO: in Python 3.2, print() does not support flush
837-
def print(*values: Any, sep: str = ' ', end: str = '\n', file: Optional[IO[str]] = None, flush: bool = False) -> None: ...
837+
def print(*values: Any, sep: str = ..., end: str = ..., file: Optional[IO[str]] = None, flush: bool = False) -> None: ...
838838
@overload
839839
def pow(x: int, y: int) -> Any: ... # The return type can be int or float, depending on y
840840
@overload

0 commit comments

Comments
 (0)