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)
"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",
"-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,