@@ -338,16 +338,15 @@ def _get_default_bash_path(cls):
338338# with Git LFS, where Git LFS may be installed in Windows but not
339339# in WSL.
340340if not is_win :
341- return ' bash'
341+ return " bash"
342342try :
343- wheregit = run (['where' ,Git .GIT_PYTHON_GIT_EXECUTABLE ],
344- check = True ,stdout = PIPE ).stdout
343+ wheregit = run (["where" ,Git .GIT_PYTHON_GIT_EXECUTABLE ],check = True ,stdout = PIPE ).stdout
345344except CalledProcessError :
346- return ' bash.exe'
345+ return " bash.exe"
347346gitpath = Path (wheregit .decode (defenc ).splitlines ()[0 ])
348347gitroot = gitpath .parent .parent
349- gitbash = gitroot / ' bin' / ' bash.exe'
350- return str (gitbash )if gitbash .exists ()else ' bash.exe'
348+ gitbash = gitroot / " bin" / " bash.exe"
349+ return str (gitbash )if gitbash .exists ()else " bash.exe"
351350
352351@classmethod
353352def refresh_bash (cls ,path :Union [None ,PathLike ]= None )-> bool :
@@ -370,24 +369,21 @@ def refresh_bash(cls, path: Union[None, PathLike] = None) -> bool:
370369# executed for whatever reason.
371370has_bash = False
372371try :
373- run ([cls .GIT_PYTHON_BASH_EXECUTABLE ,'--version' ],
374- check = True ,stdout = PIPE )
372+ run ([cls .GIT_PYTHON_BASH_EXECUTABLE ,"--version" ],check = True ,stdout = PIPE )
375373has_bash = True
376374except CalledProcessError :
377375pass
378376
379377# Warn or raise exception if test failed.
380378if not has_bash :
381- err = (
382- dedent (
383- f"""\
379+ err = dedent (
380+ f"""\
384381 Bad bash executable.
385382 The bash executable must be specified in one of the following ways:
386383 - be included in your $PATH
387384 - be set via ${ cls ._bash_exec_env_var }
388385 - explicitly set via git.refresh_bash()
389386 """
390- )
391387 )
392388
393389# Revert to whatever the old_bash was.