From: Steven Tobin Date: Mon, 19 Feb 2018 23:06:57 +0000 (+0000) Subject: flake8 checks complete X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=71976a68289739e491c63378c40713abfe8dcaa8;p=redacted-XKCD-password-generator.git flake8 checks complete --- diff --git a/xkcdpass/xkcd_password.py b/xkcdpass/xkcd_password.py index ba8a053..3651000 100755 --- a/xkcdpass/xkcd_password.py +++ b/xkcdpass/xkcd_password.py @@ -276,13 +276,15 @@ def set_case(words, method="lower", testing=False): Default method is "lower". Args: - words (list): word list generated by `choose_words()` or `find_acrostic()`. - method (str): one of {"alternating", "upper", "lower", "random"}. + words (list): word list generated by `choose_words()` or + `find_acrostic()`. + method (str): one of {"alternating", "upper", "lower", + "random"}. testing (bool): only affects method="random". - If True: the random seed will be set to each word prior - to choosing True or False before setting the case to upper. - This way we can test that random is working by giving different - word lists. + If True: the random seed will be set to each word + prior to choosing True or False before setting the + case to upper. This way we can test that random is + working by giving different word lists. """ if (method == "random") and (testing): return random_case(words, testing=True) @@ -392,7 +394,8 @@ class XkcdPassArgumentParser(argparse.ArgumentParser): "Specify that the file WORDFILE contains the list" " of valid words from which to generate passphrases." " Provided wordfiles: eff-long (default), eff-short," - " eff-special, legacy, spa-mich (Spanish), fin-kotus (Finnish)")) + " eff-special, legacy, spa-mich (Spanish)," + " fin-kotus (Finnish)")) self.add_argument( "--min", dest="min_length", type=int, default=5, metavar="MIN_LENGTH", @@ -441,8 +444,12 @@ class XkcdPassArgumentParser(argparse.ArgumentParser): "-C", "--case", dest="case", type=str, metavar="CASE", choices=list(CASE_METHODS.keys()), default="lower", - help="Choose the method for setting the case of each word in the passphrase. " - "Choices: {cap_meths} (default: 'lower').".format(cap_meths=list(CASE_METHODS.keys()))) + help=( + "Choose the method for setting the case of each word " + "in the passphrase. " + "Choices: {cap_meths} (default: 'lower').".format( + cap_meths=list(CASE_METHODS.keys()) + ))) self.add_argument( "--allow-weak-rng", action="store_true", dest="allow_weak_rng", default=False,