mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-04-15 18:11:48 +04:00
some updates and fixes
Didn't get around to it in my previous attempt, so doing it now. - updated deprecated .warn() to .warning() - unnecessary f-strings - imported sys to allow sys.exit calls instead of exit - simplified some not checks - replaced type with isinstance -
This commit is contained in:
parent
6896025288
commit
43e9a86394
5 changed files with 25 additions and 24 deletions
|
|
@ -219,12 +219,12 @@ def check_for_cygwin_mismatch() -> None:
|
|||
|
||||
if is_cygwin_python ^ is_cygwin_git:
|
||||
exe_type = {True: '(cygwin)', False: '(windows)'}
|
||||
logger.warn(
|
||||
f'pre-commit has detected a mix of cygwin python / git\n'
|
||||
f'This combination is not supported, it is likely you will '
|
||||
f'receive an error later in the program.\n'
|
||||
f'Make sure to use cygwin git+python while using cygwin\n'
|
||||
f'These can be installed through the cygwin installer.\n'
|
||||
logger.warning(
|
||||
'pre-commit has detected a mix of cygwin python / git\n'
|
||||
'This combination is not supported, it is likely you will '
|
||||
'receive an error later in the program.\n'
|
||||
'Make sure to use cygwin git+python while using cygwin\n'
|
||||
'These can be installed through the cygwin installer.\n'
|
||||
f' - python {exe_type[is_cygwin_python]}\n'
|
||||
f' - git {exe_type[is_cygwin_git]}\n',
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue