Skip to content

Commit 9cdaf0f

Browse files
committed
format update
1 parent 587bdf5 commit 9cdaf0f

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

src/ffmpeg_downloader/__init__.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
import os
44
from . import _backend as _
55

6+
67
def add_path():
78
"""Add FFmpeg directory to the process environment path
89
910
.. note::
10-
11+
1112
The system path is not updated with this command. The FFmpeg path is
1213
only added during the life of the calling Python process.
1314
@@ -16,22 +17,23 @@ def add_path():
1617
1718
ffdl install -U --add-path
1819
19-
.. note::
20+
.. note::
2021
2122
This function does not check if the FFmpeg is installed in the path. Use
2223
`ffmpeg_downloaer.installed()` to check.
2324
24-
"""
25-
os.environ['PATH'] = os.pathsep.join([os.environ["PATH"],_.ffmpeg_path()])
25+
"""
26+
os.environ["PATH"] = os.pathsep.join([os.environ["PATH"], _.ffmpeg_path()])
27+
2628

27-
def installed(bin_name='ffmpeg'):
29+
def installed(bin_name="ffmpeg"):
2830
"""True if FFmpeg binary is installed
2931
3032
:param bin_name: FFmpeg command name, defaults to 'ffmpeg'
3133
:type bin_name: 'ffmpeg', 'ffprobe', or 'ffplay', optional
3234
:return: True if installed
3335
:rtype: bool
34-
"""
36+
"""
3537

3638
return os.path.isfile(_.ffmpeg_path(bin_name))
3739

src/ffmpeg_downloader/__main__.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ def cache_purge(args):
6161

6262

6363
def download(args):
64-
6564
# select the version/asset
6665
version = ffdl.search(
6766
args.version, True, args.force, args.proxy, args.retries, args.timeout
@@ -112,7 +111,6 @@ def inquire_downloading(download_info, args):
112111

113112

114113
def install(args):
115-
116114
# validate environmental variable related arguments
117115
env_vars = {}
118116
if args.set_env is not None:
@@ -181,7 +179,6 @@ def print_no_need():
181179

182180
cache_dir = mkdtemp() if no_cache_dir else ffdl.cache_dir()
183181
try:
184-
185182
# download the install file(s)
186183
dstpaths = ffdl.download(
187184
download_info,
@@ -220,7 +217,9 @@ def print_no_need():
220217
# set symlinks or env vars
221218
ffdl.set_env_vars(args.add_path, env_vars, args.no_simlinks)
222219

223-
print(f"Successfully installed FFmpeg binaries: {ver_spec} in\n {ffdl.ffmpeg_path()}")
220+
print(
221+
f"Successfully installed FFmpeg binaries: {ver_spec} in\n {ffdl.ffmpeg_path()}"
222+
)
224223

225224

226225
def uninstall(args):

0 commit comments

Comments
 (0)