Closed Bug 1541252 Opened 5 years ago Closed 5 years ago

[python3] Fix all errors reported by pylint and flake8

Categories

(Webtools Graveyard :: Pontoon, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jotes, Assigned: jotes)

References

Details

Attachments

(4 files)

We want to run some of popular linters on the Pontoon codebase to gather issues that require fixing/improvement during the migration to Python 3.

We selected some of the known linters:

  • pylint
  • flake8

(The list is open - feel free to suggest better options).

I'll post a comment If I notice blocking errors which require bigger amount of work.

Assignee: nobody → poke
Status: NEW → ASSIGNED

Pylint (pylint --py3k) reports following errors:

  • round built-in referenced (round-builtin) (13 ocurrences)
  • filter built-in referenced when not iterating (filter-builtin-not-iterating) (5 ocurrences)
  • Implementing __eq__ without also implementing __hash__ (eq-without-hash) (3 ocurrences)
  • map built-in referenced when not iterating (map-builtin-not-iterating) (7 ocurrences)
  • Using an exception object that was bound by an except handler (exception-escape) (7 ocurrences)
  • dict.values referenced when not iterating (dict-values-not-iterating) (4 ocurrences)
  • division w/o __future__ statement (old-division) (11 ocurrences)
  • dict.items referenced when not iterating (dict-items-not-iterating) (1 ocurrences)
  • import missing from __future__ import absolute_import (no-absolute-import) (339 ocurrences)
  • dict.keys referenced when not iterating (dict-keys-not-iterating) (6 ocurrences)
  • __nonzero__ method defined (nonzero-method) (1 ocurrences)

Bumping priority to reflect we're working on this in the current quarter.

Priority: -- → P2
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED

Mmm, given the commit, I shouldn't have closed this. Apologies.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Status: REOPENED → RESOLVED
Closed: 5 years ago5 years ago
Resolution: --- → FIXED
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: