otherguy/alfred-passwords-workflow

View on GitHub
pwgen.py

Summary

Maintainability
A
0 mins
Test Coverage

Too many local variables (19/15)
Open

def main(wf):
Severity: Info
Found in pwgen.py by pylint

Used when a function or method has too many local variables.

TODO: add possibility to change options
Open

    # TODO: add possibility to change options
Severity: Minor
Found in pwgen.py by pylint

Used when a warning note as FIXME or XXX is detected.

Anomalous backslash in string: ']'. String constant might be missing an r prefix.
Open

    special_chars = "!\"#$%&'()*+,-./:;<=>?@[\]^_`{|}~"
Severity: Minor
Found in pwgen.py by pylint

Used when a backslash is in a literal string but not as an escape.

Unable to import 'xkcdpass'
Open

    from xkcdpass import xkcd_password as xp
Severity: Critical
Found in pwgen.py by pylint

Used when pylint has been unable to import a module.

Unable to import 'workflow'
Open

from workflow import Workflow3 as Workflow, ICON_INFO
Severity: Critical
Found in pwgen.py by pylint

Used when pylint has been unable to import a module.

TODO found
Open

    # TODO: add possibility to change options
Severity: Minor
Found in pwgen.py by fixme

Line too long (138/100)
Open

        'xkcd_wordllist': 'eff-long', # eff-long (English), spa-mich (Spanish), fin-kotus (Finnish), ita-wiki (Italian), ger-anlx (German)
Severity: Info
Found in pwgen.py by pylint

Used when a line is longer than a given number of characters.

Line too long (118/100)
Open

    wf.add_item('%d character password (no special characters)' % password_length, alnum_pw, valid=True, arg=alnum_pw)
Severity: Info
Found in pwgen.py by pylint

Used when a line is longer than a given number of characters.

Line too long (101/100)
Open

    full_pw_charset = string.ascii_uppercase + string.ascii_lowercase + string.digits + special_chars
Severity: Info
Found in pwgen.py by pylint

Used when a line is longer than a given number of characters.

Missing function or method docstring
Open

def main(wf):
Severity: Info
Found in pwgen.py by pylint

Used when a function or method has no docstring. Some special methods like init do not require a docstring.

Import outside toplevel (random.SystemRandom)
Open

    from random import SystemRandom
Severity: Info
Found in pwgen.py by pylint

Used when an import statement is used anywhere other than the module toplevel. Move this import to the top of the file.

Argument name wf doesn't conform to snake_case naming style
Open

def main(wf):
Severity: Info
Found in pwgen.py by pylint

Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).

Import outside toplevel (xkcdpass.xkcd_password)
Open

    from xkcdpass import xkcd_password as xp
Severity: Info
Found in pwgen.py by pylint

Used when an import statement is used anywhere other than the module toplevel. Move this import to the top of the file.

Formatting a regular string which could be a f-string
Open

    wf.add_item('%d character password (no special characters)' % password_length, alnum_pw, valid=True, arg=alnum_pw)
Severity: Info
Found in pwgen.py by pylint

Used when we detect a string that is being formatted with format() or % which could potentially be a f-string. The use of f-strings is preferred. Requires Python 3.6 and py-version >= 3.6.

Formatting a regular string which could be a f-string
Open

    wf.add_item('%d character password' % password_length, full_pw, valid=True, arg=full_pw)
Severity: Info
Found in pwgen.py by pylint

Used when we detect a string that is being formatted with format() or % which could potentially be a f-string. The use of f-strings is preferred. Requires Python 3.6 and py-version >= 3.6.

Missing module docstring
Open

#!/usr/bin/env python
Severity: Info
Found in pwgen.py by pylint

Used when a module has no docstring. Empty modules do not require a docstring.

Import outside toplevel (string)
Open

    import string
Severity: Info
Found in pwgen.py by pylint

Used when an import statement is used anywhere other than the module toplevel. Move this import to the top of the file.

Expected an indentation at 36 instead of at 35.
Open

                                   max_length=xkcd_max_length)
Severity: Minor
Found in pwgen.py by editorconfig

Expected an indentation at 36 instead of at 35.
Open

                                   min_length=xkcd_min_length,
Severity: Minor
Found in pwgen.py by editorconfig

There are no issues that match your filters.

Category
Status