AlexMathew/scrapple

View on GitHub
scrapple/utils/dynamicdispatch.py

Summary

Maintainability
A
0 mins
Test Coverage

Indentation contains mixed spaces and tabs
Open

        'run': run,
Severity: Minor
Found in scrapple/utils/dynamicdispatch.py by pep8

Never mix tabs and spaces.

The most popular way of indenting Python is with spaces only.  The
second-most popular way is with tabs only.  Code indented with a
mixture of tabs and spaces should be converted to using spaces
exclusively.  When invoking the Python command line interpreter with
the -t option, it issues warnings about code that illegally mixes
tabs and spaces.  When using -tt these warnings become errors.
These options are highly recommended!

Okay: if a == 0:\n    a = 1\n    b = 1
E101: if a == 0:\n        a = 1\n\tb = 1

Indentation contains tabs
Open

        'generate': generate,
Severity: Minor
Found in scrapple/utils/dynamicdispatch.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        'run': run,
Severity: Minor
Found in scrapple/utils/dynamicdispatch.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Line too long (80 > 79 characters)
Open

    cmdClass = getattr(commandMapping.get(command), command.title() + 'Command')
Severity: Minor
Found in scrapple/utils/dynamicdispatch.py by pep8

Limit all lines to a maximum of 79 characters.

There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side.  The default wrapping on such
devices looks ugly.  Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.

Reports error E501.

Indentation contains mixed spaces and tabs
Open

        'genconfig': genconfig,
Severity: Minor
Found in scrapple/utils/dynamicdispatch.py by pep8

Never mix tabs and spaces.

The most popular way of indenting Python is with spaces only.  The
second-most popular way is with tabs only.  Code indented with a
mixture of tabs and spaces should be converted to using spaces
exclusively.  When invoking the Python command line interpreter with
the -t option, it issues warnings about code that illegally mixes
tabs and spaces.  When using -tt these warnings become errors.
These options are highly recommended!

Okay: if a == 0:\n    a = 1\n    b = 1
E101: if a == 0:\n        a = 1\n\tb = 1

Expected 2 blank lines, found 1
Open

def get_command_class(command):
Severity: Minor
Found in scrapple/utils/dynamicdispatch.py by pep8

Separate top-level function and class definitions with two blank lines.

Method definitions inside a class are separated by a single blank
line.

Extra blank lines may be used (sparingly) to separate groups of
related functions.  Blank lines may be omitted between a bunch of
related one-liners (e.g. a set of dummy implementations).

Use blank lines in functions, sparingly, to indicate logical
sections.

Okay: def a():\n    pass\n\n\ndef b():\n    pass
Okay: def a():\n    pass\n\n\nasync def b():\n    pass
Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
Okay: default = 1\nfoo = 1
Okay: classify = 1\nfoo = 1

E301: class Foo:\n    b = 0\n    def bar():\n        pass
E302: def a():\n    pass\n\ndef b(n):\n    pass
E302: def a():\n    pass\n\nasync def b(n):\n    pass
E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
E303: def a():\n\n\n\n    pass
E304: @decorator\n\ndef a():\n    pass
E305: def a():\n    pass\na()
E306: def a():\n    def b():\n        pass\n    def c():\n        pass

Indentation contains mixed spaces and tabs
Open

        'web': web
Severity: Minor
Found in scrapple/utils/dynamicdispatch.py by pep8

Never mix tabs and spaces.

The most popular way of indenting Python is with spaces only.  The
second-most popular way is with tabs only.  Code indented with a
mixture of tabs and spaces should be converted to using spaces
exclusively.  When invoking the Python command line interpreter with
the -t option, it issues warnings about code that illegally mixes
tabs and spaces.  When using -tt these warnings become errors.
These options are highly recommended!

Okay: if a == 0:\n    a = 1\n    b = 1
E101: if a == 0:\n        a = 1\n\tb = 1

Indentation contains tabs
Open

        'genconfig': genconfig,
Severity: Minor
Found in scrapple/utils/dynamicdispatch.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains mixed spaces and tabs
Open

        'generate': generate,
Severity: Minor
Found in scrapple/utils/dynamicdispatch.py by pep8

Never mix tabs and spaces.

The most popular way of indenting Python is with spaces only.  The
second-most popular way is with tabs only.  Code indented with a
mixture of tabs and spaces should be converted to using spaces
exclusively.  When invoking the Python command line interpreter with
the -t option, it issues warnings about code that illegally mixes
tabs and spaces.  When using -tt these warnings become errors.
These options are highly recommended!

Okay: if a == 0:\n    a = 1\n    b = 1
E101: if a == 0:\n        a = 1\n\tb = 1

Indentation contains tabs
Open

        'web': web
Severity: Minor
Found in scrapple/utils/dynamicdispatch.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

There are no issues that match your filters.

Category
Status