Skip to content

Commit 50c74f4

Browse files
committed
updates after running black
1 parent 6676668 commit 50c74f4

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

Diff for: AUTHORS

+1
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,6 @@ Contributors are:
5353
-Santos Gallegos <stsewd _at_ proton.me>
5454
-Wenhan Zhu <wzhu.cosmos _at_ gmail.com>
5555
-Eliah Kagan <eliah.kagan _at_ gmail.com>
56+
-Randy Eckman <emanspeaks _at_ gmail.com>
5657

5758
Portions derived from other open source works and are clearly marked.

Diff for: git/cmd.py

+8-12
Original file line numberDiff line numberDiff line change
@@ -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.
340340
if not is_win:
341-
return 'bash'
341+
return "bash"
342342
try:
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
345344
except CalledProcessError:
346-
return 'bash.exe'
345+
return "bash.exe"
347346
gitpath = Path(wheregit.decode(defenc).splitlines()[0])
348347
gitroot = 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
353352
def 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.
371370
has_bash = False
372371
try:
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)
375373
has_bash = True
376374
except CalledProcessError:
377375
pass
378376

379377
# Warn or raise exception if test failed.
380378
if 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.

0 commit comments

Comments
 (0)