Fix pre-commit in python 3.6.0-3.6.1

This commit is contained in:
Anthony Sottile 2020-01-29 17:40:16 -08:00
parent 0cc199d351
commit 9e4dc7f349
3 changed files with 11 additions and 4 deletions

View file

@ -1,11 +1,14 @@
import os.path
from typing import Mapping
from typing import NoReturn
from typing import Optional
from typing import Tuple
from typing import TYPE_CHECKING
from identify.identify import parse_shebang_from_file
if TYPE_CHECKING:
from typing import NoReturn
class ExecutableNotFoundError(OSError):
def to_output(self) -> Tuple[int, bytes, None]:
@ -44,7 +47,7 @@ def find_executable(
def normexe(orig: str) -> str:
def _error(msg: str) -> NoReturn:
def _error(msg: str) -> 'NoReturn':
raise ExecutableNotFoundError(f'Executable `{orig}` {msg}')
if os.sep not in orig and (not os.altsep or os.altsep not in orig):