From c18537439ff030a4c5bdc5f0a6ff01a05e7eef98 Mon Sep 17 00:00:00 2001 From: Bahtiar `kalkin-` Gadimov Date: Wed, 13 Jul 2016 20:38:46 +0200 Subject: [PATCH] =?UTF-8?q?Make=20pylint=20really=20happy=20=E2=99=A5?= =?UTF-8?q?=E2=99=A5=E2=99=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- qubes/__init__.py | 14 ++------------ qubes/app.py | 19 ++++++++++--------- qubes/ext/qubesmanager.py | 2 +- qubes/utils.py | 6 ++---- 4 files changed, 15 insertions(+), 26 deletions(-) diff --git a/qubes/__init__.py b/qubes/__init__.py index fafbcb65..233f480f 100644 --- a/qubes/__init__.py +++ b/qubes/__init__.py @@ -32,22 +32,12 @@ Qubes OS from __future__ import absolute_import +import __builtin__ import collections -import errno -import grp -import logging import os import os.path -import sys -import tempfile -import time -import __builtin__ - -import jinja2 import lxml.etree -import pkg_resources - import qubes.config import qubes.events import qubes.exc @@ -439,7 +429,7 @@ class PropertyHolder(qubes.events.Emitter): propvalues = {} all_names = set(prop.__name__ for prop in self.property_list()) - for key in list(kwargs.keys()): + for key in list(kwargs): if not key in all_names: continue propvalues[key] = kwargs.pop(key) diff --git a/qubes/app.py b/qubes/app.py index 805a64f4..369c6720 100644 --- a/qubes/app.py +++ b/qubes/app.py @@ -36,13 +36,14 @@ import tempfile import time import uuid -import jinja2 import lxml.etree + +import jinja2 import libvirt try: - import xen.lowlevel.xs - import xen.lowlevel.xc + import xen.lowlevel.xs # pylint: disable=wrong-import-order + import xen.lowlevel.xc # pylint: disable=wrong-import-order except ImportError: pass @@ -58,12 +59,12 @@ else: raise RuntimeError("Qubes works only on POSIX or WinNT systems") -import qubes -import qubes.ext -import qubes.utils -import qubes.vm.adminvm -import qubes.vm.qubesvm -import qubes.vm.templatevm +import qubes # pylint: disable=wrong-import-position +import qubes.ext # pylint: disable=wrong-import-position +import qubes.utils # pylint: disable=wrong-import-position +import qubes.vm.adminvm # pylint: disable=wrong-import-position +import qubes.vm.qubesvm # pylint: disable=wrong-import-position +import qubes.vm.templatevm # pylint: disable=wrong-import-position class VirDomainWrapper(object): diff --git a/qubes/ext/qubesmanager.py b/qubes/ext/qubesmanager.py index 41b489cf..9b002d99 100644 --- a/qubes/ext/qubesmanager.py +++ b/qubes/ext/qubesmanager.py @@ -29,8 +29,8 @@ .. warning:: API defined here is not declared stable. ''' -import qubes.ext import dbus +import qubes.ext class QubesManager(qubes.ext.Extension): diff --git a/qubes/utils.py b/qubes/utils.py index 8f0e3121..6b012c17 100644 --- a/qubes/utils.py +++ b/qubes/utils.py @@ -29,11 +29,11 @@ import os import re import subprocess +import pkg_resources + import docutils import docutils.core import docutils.io -import pkg_resources - import qubes.exc @@ -158,5 +158,3 @@ def get_entry_point_one(group, name): ', '.join('{}.{}'.format(ep.module_name, '.'.join(ep.attrs)) for ep in epoints))) return epoints[0].load() - -