HomePhabricator
Diffusion Scap 0e22bcfb50c4

Scap plugins: Tidy up imports for py3 transition

Authored by demon on May 4 2018, 6:59 PM.

Description

Scap plugins: Tidy up imports for py3 transition

Summary:
Python3 actually calls for using 'from . import bar' syntax for imports. This seems weird, as Python is not known for verbosity being a guiding trait. But when you think about it, it makes sense. When importing via ./.., you're making it completely explicit as to what module you're wanting to load. The one relative to your current file. So let's start moving there (and in fact, is what absolute_imports helps you when you get wrong).

Step 1: plugins.

While we're here, fix some lambda/list comprehension. It's not wrong as-is, but is easier to read and doesn't trigger idomatic warnings

Reviewers: mmodell, Release-Engineering-Team, thcipriani

Reviewed By: Release-Engineering-Team, thcipriani

Subscribers: thcipriani

Tags: Release-Engineering-Team

Differential Revision: https://phabricator.wikimedia.org/D1041

Details

Committed
demonMay 4 2018, 7:04 PM
Reviewer
Release-Engineering-Team
Differential Revision
D1041: Scap plugins: Tidy up imports for py3 transition
Parents
rMSCAe33ad0d3b6c5: Fixing coverage ignores
Branches
Unknown
Tags
Unknown
ChangeId
None
Build Status
Buildable 2965
Build 4970: ci-jessieJenkins