mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
Add flags to pass on --warn-unused-ignores and --no-implicit-optional to mypy (#1421)
* Add flags to pass on --warn-unused-ignores and --no-implicit-optional to mypy
* Make implicit Optional explicit in arg types (2and3 part)
* Convert {stdlib,third_party}/2 to explicit Optional
This commit is contained in:
committed by
Jelle Zijlstra
parent
30256097ea
commit
04fe184dcf
@@ -1,21 +1,21 @@
|
||||
# Stubs for bz2
|
||||
|
||||
from typing import Any, BinaryIO, TextIO, IO, Union
|
||||
from typing import Any, BinaryIO, TextIO, IO, Optional, Union
|
||||
|
||||
def compress(data: bytes, compresslevel: int = ...) -> bytes: ...
|
||||
def decompress(data: bytes) -> bytes: ...
|
||||
|
||||
def open(filename: Union[str, bytes, IO[Any]],
|
||||
mode: str = 'rb',
|
||||
encoding: str = None,
|
||||
errors: str = None,
|
||||
newline: str = None) -> IO[Any]: ...
|
||||
encoding: Optional[str] = None,
|
||||
errors: Optional[str] = None,
|
||||
newline: Optional[str] = None) -> IO[Any]: ...
|
||||
|
||||
class BZ2File(BinaryIO):
|
||||
def __init__(self,
|
||||
filename: Union[str, bytes, IO[Any]],
|
||||
mode: str = "r",
|
||||
buffering: Any = None,
|
||||
buffering: Optional[Any] = None,
|
||||
compresslevel: int = 9) -> None: ...
|
||||
|
||||
class BZ2Compressor(object):
|
||||
|
||||
Reference in New Issue
Block a user