Uploaded image for project: 'openATTIC'
  1. openATTIC
  2. OP-838

Code Cleanup: fix errors/warnings generated by flake8

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Reopened
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.0.5, 3.5.2
    • Fix Version/s: None
    • Component/s: Backend
    • Story Points:
      1
    • Sprint:
      Sprint 17, Sprint 18, Sprint 19, Sprint 20, Sprint 32, Sprint 33

      Description

      The Python backend code currently triggers a lot of warnings and errors when using the flake8 tool:

      2       E111 indentation is not a multiple of four
      1       E121 continuation line under-indented for hanging indent
      20      E124 closing bracket does not match visual indentation
      15      E126 continuation line over-indented for hanging indent
      6       E127 continuation line over-indented for visual indent
      76      E128 continuation line under-indented for visual indent
      1       E129 visually indented line with same indent as next logical line
      587     E201 whitespace after '('
      532     E202 whitespace before ']'
      10      E203 whitespace before ','
      1       E211 whitespace before '('
      695     E221 multiple spaces before operator
      6       E222 multiple spaces after operator
      5       E225 missing whitespace around operator
      32      E227 missing whitespace around bitwise or shift operator
      12      E231 missing whitespace after ':'
      84      E251 unexpected spaces around keyword / parameter equals
      16      E261 at least two spaces before inline comment
      1       E262 inline comment should start with '# '
      14      E265 block comment should start with '# '
      2       E271 multiple spaces after keyword
      112     E272 multiple spaces before keyword
      2       E301 expected 1 blank line, found 0
      332     E302 expected 2 blank lines, found 1
      22      E303 too many blank lines (3)
      4       E401 multiple imports on one line
      1434    E501 line too long (83 > 79 characters)
      16      E701 multiple statements on one line (colon)
      1       E703 statement ends with a semicolon
      1       E712 comparison to False should be 'if cond is False:' or 'if not cond:'
      91      F401 'method' imported but unused
      5       F811 redefinition of unused 'lvm' from line 30
      3       F812 list comprehension redefines 'module' from line 258
      2       F821 undefined name 'sys'
      22      F841 local variable 'master' is assigned to but never used
      3       W292 no newline at end of file
      47      W391 blank line at end of file
      

      As we strive to follow the coding guidelines outlined in PEP-8, we should also improve the existing code base.

        Attachments

          Issue Links

          1.
          Fix Btrfs app issues Sub-task Closed Unassigned
          2.
          Fix Ceph app issues Sub-task Resolved Dehler, Tatjana
          3.
          Fix cmdlog app issues Sub-task Closed Dehler, Tatjana
          4.
          Fix cron app issues Sub-task Closed Unassigned
          5.
          Fix http app issues Sub-task Closed Dehler, Tatjana
          6.
          Fix ifconfig app issues Sub-task Reopened Dehler, Tatjana
          7.
          Fix ipmi app issues Sub-task Closed Unassigned
          8.
          Fix lio app issues Sub-task Closed Unassigned
          9.
          Fix mailaliases app issues Sub-task Closed Unassigned
          10.
          Fix mdraid app issues Sub-task Closed Unassigned
          11.
          Fix nfs app issues Sub-task Closed Dehler, Tatjana
          12.
          Fix nodb app issues Sub-task Resolved Dehler, Tatjana
          13.
          Fix peering app issues Sub-task Closed Unassigned
          14.
          Fix pkgapt app issues Sub-task Closed Unassigned
          15.
          Fix rest app issues Sub-task Resolved Dehler, Tatjana
          16.
          Fix rpcd app issues Sub-task Closed Unassigned
          17.
          Fix samba app issues Sub-task Closed Dehler, Tatjana
          18.
          Fix systemd app issues Sub-task Resolved Dehler, Tatjana
          19.
          Fix sysutils app issues Sub-task Reopened Dehler, Tatjana
          20.
          Fix zfs app issues Sub-task Closed Unassigned
          21.
          Flake8 shouldn't check Django migration files Sub-task Closed Dehler, Tatjana
          22.
          Fix ceph_iscsi app issues Sub-task Open Unassigned
          23.
          Fix taskqueue app issues Sub-task Open Unassigned
          24.
          Fix issues of oA backend base Sub-task Open Unassigned
          25.
          Fix grafana app issues Sub-task Open Unassigned
          26.
          Fix userprefs app issues Sub-task Open Unassigned
          27.
          Fix ceph_deployment app issues Sub-task Open Unassigned
          28.
          Fix ceph_nfs app issues Sub-task Open Unassigned
          29.
          Fix oa_settings app issues Sub-task Open Unassigned
          30.
          Fix ceph_radosgw app issues Sub-task Open Unassigned
          31.
          Tag all lines where current pep8 issues should be ignored Sub-task Open Unassigned
          32.
          Add a flake8 check to the PR Jenkins test job Sub-task Closed Unassigned
          33.
          Jenkins should check the backend code style (pep8) for every backend related pull request Sub-task Open Paduano, Laura

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                lgrimmer Grimmer, Lenz
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: