aboutsummaryrefslogtreecommitdiff
path: root/devscripts/bash-completion.py
diff options
context:
space:
mode:
authorJouke Waleson <jouke.waleson@mendix.com>2014-11-23 20:41:03 +0100
committerJouke Waleson <jouke.waleson@mendix.com>2014-11-23 20:41:03 +0100
commit5f6a1245ffa9276c1af59b0835afeef67e2fb5b1 (patch)
tree139c6ede405cf3898e4639f0bf13d32d140fa5f1 /devscripts/bash-completion.py
parent598c218f7b5c3e78f98dad40f45646c0c9ec773e (diff)
PEP8 applied
Diffstat (limited to 'devscripts/bash-completion.py')
-rwxr-xr-xdevscripts/bash-completion.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/devscripts/bash-completion.py b/devscripts/bash-completion.py
index 49287724d..70a3f552c 100755
--- a/devscripts/bash-completion.py
+++ b/devscripts/bash-completion.py
@@ -9,16 +9,17 @@ import youtube_dl
BASH_COMPLETION_FILE = "youtube-dl.bash-completion"
BASH_COMPLETION_TEMPLATE = "devscripts/bash-completion.in"
+
def build_completion(opt_parser):
opts_flag = []
for group in opt_parser.option_groups:
for option in group.option_list:
- #for every long flag
+ # for every long flag
opts_flag.append(option.get_opt_string())
with open(BASH_COMPLETION_TEMPLATE) as f:
template = f.read()
with open(BASH_COMPLETION_FILE, "w") as f:
- #just using the special char
+ # just using the special char
filled_template = template.replace("{{flags}}", " ".join(opts_flag))
f.write(filled_template)