move imports to top of the file
Bug #656219 reported by
Daniel Holbach
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
harvest |
Fix Released
|
Low
|
Unassigned |
Bug Description
<spike> all imports should go at the top of the file, not inside functions. golden rule is fail fast. if your app depends on some libs that are not installed it should tell the user right away, not do work and possibly fail later mid way some job
Related branches
lp:~arvindsraj-deactivatedaccount/harvest/imports-fixed
- Daniel Holbach: Approve
-
Diff: 512 lines (+89/-88)24 files modifiedharvest/common/launchpad.py (+1/-2)
harvest/common/opportunity_lists.py (+12/-13)
harvest/common/templatetags/humanize_timediff.py (+2/-1)
harvest/common/utils.py (+5/-5)
harvest/common/views.py (+6/-4)
harvest/filters/containers.py (+1/-1)
harvest/filters/filters.py (+1/-1)
harvest/manage.py (+2/-0)
harvest/opportunities/filters.py (+3/-2)
harvest/opportunities/forms.py (+2/-1)
harvest/opportunities/management/commands/import-translations.py (+4/-5)
harvest/opportunities/management/commands/init-harvest.py (+1/-2)
harvest/opportunities/management/commands/release.py (+4/-4)
harvest/opportunities/management/commands/update-template.py (+2/-3)
harvest/opportunities/management/commands/update.py (+2/-2)
harvest/opportunities/management/commands/updatelists.py (+5/-6)
harvest/opportunities/management/commands/updateopportunities.py (+4/-4)
harvest/opportunities/management/commands/updatepackagesets.py (+3/-3)
harvest/opportunities/models.py (+3/-3)
harvest/opportunities/views.py (+5/-6)
harvest/services/__init__.py (+4/-3)
harvest/services/views.py (+2/-2)
harvest/settings.py (+14/-14)
harvest/urls.py (+1/-1)
Changed in harvest: | |
importance: | Undecided → Medium |
status: | New → Triaged |
Changed in harvest: | |
milestone: | none → 0.2.2 |
Changed in harvest: | |
importance: | Medium → Low |
milestone: | 0.2.2 → none |
Changed in harvest: | |
assignee: | nobody → Arvind S Raj (arvindsraj) |
Changed in harvest: | |
status: | Triaged → In Progress |
Changed in harvest: | |
milestone: | none → 0.2.5 |
status: | In Progress → Fix Committed |
Changed in harvest: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Perhaps the order of the imports could arranged so that it conforms to PEP-8?