flake8 checks complete
authorSteven Tobin <steventtobin (at) gmail.com>
Mon, 19 Feb 2018 23:06:57 +0000 (23:06 +0000)
committerSteven Tobin <steventtobin (at) gmail.com>
Mon, 19 Feb 2018 23:06:57 +0000 (23:06 +0000)
xkcdpass/xkcd_password.py

index ba8a053a2b14f66d56b06e76e3e4d0a1ad61427d..3651000ed578529ec013aaf7f20c21d78176c74b 100755 (executable)
@@ -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,
git clone https://git.99rst.org/PROJECT