maestro-server/report-app

View on GitHub
app/tasks/upload_json.py

Summary

Maintainability
A
35 mins
Test Coverage
F
44%

Function task_upload has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

def task_upload(report_id, owner_user, name, result, type=None):
Severity: Minor
Found in app/tasks/upload_json.py - About 35 mins to fix

    Ambiguous variable name 'l'
    Open

        l = len(iterable)
    Severity: Minor
    Found in app/tasks/upload_json.py by pep8

    Never use the characters 'l', 'O', or 'I' as variable names.

    In some fonts, these characters are indistinguishable from the
    numerals one and zero. When tempted to use 'l', use 'L' instead.
    
    Okay: L = 0
    Okay: o = 123
    Okay: i = 42
    E741: l = 0
    E741: O = 123
    E741: I = 42
    
    Variables can be bound in several other contexts, including class
    and function definitions, 'global' and 'nonlocal' statements,
    exception handlers, and 'with' and 'for' statements.
    In addition, we have a special handling for function parameters.
    
    Okay: except AttributeError as o:
    Okay: with lock as L:
    Okay: foo(l=12)
    Okay: for a in foo(l=12):
    E741: except AttributeError as O:
    E741: with lock as l:
    E741: global I
    E741: nonlocal l
    E741: def foo(l):
    E741: def foo(l=12):
    E741: l = foo(l=12)
    E741: for l in range(10):
    E742: class I(object):
    E743: def l(x):

    Line too long (87 > 79 characters)
    Open

                                                  more={'columns': prefetch, 'aggr': aggr})
    Severity: Minor
    Found in app/tasks/upload_json.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.

    Line too long (85 > 79 characters)
    Open

        notification_id = task_notification.delay(report_id=report_id, status='finished',
    Severity: Minor
    Found in app/tasks/upload_json.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.

    There are no issues that match your filters.

    Category
    Status