From df0853f6f310c0a3434b7b4eee14466b9bc477d8 Mon Sep 17 00:00:00 2001 From: Adar Nimrod <nimrod@shore.co.il> Date: Thu, 15 Aug 2019 00:21:17 +0300 Subject: [PATCH] Vagrant scripts. - Add missing symlink to the wrapper script, without it the scripts can't be called as Vagrant commands. - Fix pylint issues. --- Documents/bin/_vagrant-clean | 5 +++++ Documents/bin/_vagrant-update | 5 +++++ Documents/bin/urldecode | 5 +++-- Documents/bin/urlencode | 5 +++-- Documents/bin/vagrant | 1 + 5 files changed, 17 insertions(+), 4 deletions(-) create mode 120000 Documents/bin/vagrant diff --git a/Documents/bin/_vagrant-clean b/Documents/bin/_vagrant-clean index 6251fdf..206d4b1 100755 --- a/Documents/bin/_vagrant-clean +++ b/Documents/bin/_vagrant-clean @@ -1,6 +1,11 @@ #!/usr/bin/env python3 +# pylint: disable=invalid-name +"""Remove duplicate versions of local Vagrant base boxes.""" +# pylint: disable=import-error from sh import vagrant + +# pylint: disable=no-name-in-module from parse import parse diff --git a/Documents/bin/_vagrant-update b/Documents/bin/_vagrant-update index 141f1c9..ae2e874 100755 --- a/Documents/bin/_vagrant-update +++ b/Documents/bin/_vagrant-update @@ -1,6 +1,11 @@ #!/usr/bin/env python3 +# pylint: disable=invalid-name +"""Update local Vagrant base boxes.""" +# pylint: disable=import-error from sh import vagrant + +# pylint: disable=no-name-in-module from parse import parse diff --git a/Documents/bin/urldecode b/Documents/bin/urldecode index 181f14e..b70a62a 100755 --- a/Documents/bin/urldecode +++ b/Documents/bin/urldecode @@ -1,8 +1,9 @@ #!/usr/bin/env python3 -from fileinput import input +"""Decode url-encoded input.""" +import fileinput from urllib.parse import unquote_plus as unquote if __name__ == "__main__": - for line in input(): + for line in fileinput.input(): print(unquote(line.strip())) diff --git a/Documents/bin/urlencode b/Documents/bin/urlencode index 5b1af72..02a1441 100755 --- a/Documents/bin/urlencode +++ b/Documents/bin/urlencode @@ -1,8 +1,9 @@ #!/usr/bin/env python3 -from fileinput import input +"""URL encode input.""" +import fileinput from urllib.parse import quote_plus as quote if __name__ == "__main__": - for line in input(): + for line in fileinput.input(): print(quote(line.strip())) diff --git a/Documents/bin/vagrant b/Documents/bin/vagrant new file mode 120000 index 0000000..22cb46f --- /dev/null +++ b/Documents/bin/vagrant @@ -0,0 +1 @@ +wrapper \ No newline at end of file -- GitLab