mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-02 17:43:25 +08:00
Two small changes to help the mypy test suite pass (#355)
* Condition arg for skip{If,Unless} should be object, not bool.
* Env arg to os.get_exec_path() is a Mapping, not a Dict.
This commit is contained in:
committed by
David Fisher
parent
b48ddf7532
commit
1c4662d2f3
@@ -159,7 +159,7 @@ class statvfs_result: # Unix only
|
||||
# ----- os function stubs -----
|
||||
def fsencode(filename: str) -> bytes: ...
|
||||
def fsdecode(filename: bytes) -> str: ...
|
||||
def get_exec_path(env: Optional[Dict[str, str]] = ...) -> List[str] : ...
|
||||
def get_exec_path(env: Optional[Mapping[str, str]] = ...) -> List[str] : ...
|
||||
# NOTE: get_exec_path(): returns List[bytes] when env not None
|
||||
def ctermid() -> str: ... # Unix only
|
||||
def getegid() -> int: ... # Unix only
|
||||
|
||||
@@ -15,8 +15,8 @@ _FT = TypeVar('_FT', Callable[[Any], Any])
|
||||
|
||||
|
||||
def skip(reason: str) -> Callable[[_FT], _FT]: ...
|
||||
def skipIf(condition: bool, reason: str) -> Callable[[_FT], _FT]: ...
|
||||
def skipUnless(condition: bool, reason: str) -> Callable[[_FT], _FT]: ...
|
||||
def skipIf(condition: object, reason: str) -> Callable[[_FT], _FT]: ...
|
||||
def skipUnless(condition: object, reason: str) -> Callable[[_FT], _FT]: ...
|
||||
def expectedFailure(func: _FT) -> _FT: ...
|
||||
|
||||
class SkipTest(Exception):
|
||||
|
||||
Reference in New Issue
Block a user