Fix pylint checks

Change-Id: I784ee29952fc4cc1f605b60023a0c7ad30aef2e2
Partial-Bug: #1696455
This commit is contained in:
Saad Zaher 2017-06-07 16:15:01 +01:00
parent 7e3efd8b0d
commit f609f3b9ac
6 changed files with 9 additions and 21 deletions

View File

@ -44,7 +44,7 @@ symbols=no
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use"--disable=all --enable=classes
# --disable=W"
disable=W,C,R,E1002
disable=W,C,R,E1002,no-member
[REPORTS]

View File

@ -64,6 +64,7 @@ def freezer_main(backup_args):
backup_args.__dict__)
if backup_args.storages:
# pylint: disable=abstract-class-instantiated
storage = multiple.MultipleStorage(
[storage_from_dict(x, max_segment_size)
for x in backup_args.storages])

View File

@ -20,13 +20,13 @@ import time
from oslo_log import log
import requests
from requests.packages.urllib3.exceptions import InsecureRequestWarning
from requests.packages import urllib3
from freezer.storage import physical
LOG = log.getLogger(__name__)
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
class SwiftStorage(physical.PhysicalStorage):

View File

@ -21,7 +21,6 @@ from glanceclient.common import utils as glance_utils
import mock
from oslo_config import cfg
from oslo_config import fixture as cfg_fixture
import six
import testtools
from freezer.common import config
@ -346,10 +345,7 @@ class BackupOpt1(object):
self.storage = mock.MagicMock()
self.engine = mock.MagicMock()
opts = osclients.OpenstackOpts.create_from_env().get_opts_dicts()
self.client_manager = osclients.OSClientManager(opts.pop('auth_url'),
opts.pop(
'auth_method'),
**opts)
self.client_manager = osclients.OSClientManager(**opts)
self.client_manager.get_swift = mock.Mock(
return_value=FakeSwiftClient().client.Connection())
self.client_manager.create_swift = self.client_manager.get_swift
@ -484,17 +480,11 @@ class FakeDisableFileSystemRedirection(object):
class FreezerBaseTestCase(testtools.TestCase):
def setUp(self):
if six.PY34:
super().setUp()
else:
super(FreezerBaseTestCase, self).setUp()
super(FreezerBaseTestCase, self).setUp()
self._config_fixture = self.useFixture(cfg_fixture.Config())
config.config(args=[])
self.addCleanup(CONF.reset)
def tearDown(self):
if six.PY34:
super().tearDown()
else:
super(FreezerBaseTestCase, self).tearDown()
super(FreezerBaseTestCase, self).tearDown()

View File

@ -27,10 +27,7 @@ class TestOsClients(unittest.TestCase):
auth_url="url/v3", password="password", identity_api_version="3",
insecure=False, cacert='cert', user_domain_name='Default',
project_domain_name='Default').get_opts_dicts()
self.client_manager = osclients.OSClientManager(
auth_method=self.opts.pop('auth_method'),
auth_url=self.opts.pop('auth_url'),
**self.opts)
self.client_manager = osclients.OSClientManager(**self.opts)
def test_init(self):
self.client_manager.get_cinder()

View File

@ -6,7 +6,7 @@ hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0
ddt>=1.0.1 # MIT
mock>=2.0 # BSD
pylint==1.4.5 # GPLv2
pylint==1.7.1 # GPLv2
python-subunit>=0.0.18 # Apache-2.0/BSD
sphinx!=1.6.1,>=1.5.1 # BSD
oslosphinx>=4.7.0 # Apache-2.0