Fix pylint checks
Change-Id: I784ee29952fc4cc1f605b60023a0c7ad30aef2e2 Partial-Bug: #1696455
This commit is contained in:
parent
7e3efd8b0d
commit
f609f3b9ac
@ -44,7 +44,7 @@ symbols=no
|
|||||||
# --enable=similarities". If you want to run only the classes checker, but have
|
# --enable=similarities". If you want to run only the classes checker, but have
|
||||||
# no Warning level messages displayed, use"--disable=all --enable=classes
|
# no Warning level messages displayed, use"--disable=all --enable=classes
|
||||||
# --disable=W"
|
# --disable=W"
|
||||||
disable=W,C,R,E1002
|
disable=W,C,R,E1002,no-member
|
||||||
|
|
||||||
|
|
||||||
[REPORTS]
|
[REPORTS]
|
||||||
|
@ -64,6 +64,7 @@ def freezer_main(backup_args):
|
|||||||
backup_args.__dict__)
|
backup_args.__dict__)
|
||||||
|
|
||||||
if backup_args.storages:
|
if backup_args.storages:
|
||||||
|
# pylint: disable=abstract-class-instantiated
|
||||||
storage = multiple.MultipleStorage(
|
storage = multiple.MultipleStorage(
|
||||||
[storage_from_dict(x, max_segment_size)
|
[storage_from_dict(x, max_segment_size)
|
||||||
for x in backup_args.storages])
|
for x in backup_args.storages])
|
||||||
|
@ -20,13 +20,13 @@ import time
|
|||||||
|
|
||||||
from oslo_log import log
|
from oslo_log import log
|
||||||
import requests
|
import requests
|
||||||
from requests.packages.urllib3.exceptions import InsecureRequestWarning
|
from requests.packages import urllib3
|
||||||
|
|
||||||
from freezer.storage import physical
|
from freezer.storage import physical
|
||||||
|
|
||||||
LOG = log.getLogger(__name__)
|
LOG = log.getLogger(__name__)
|
||||||
|
|
||||||
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
|
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
|
||||||
|
|
||||||
|
|
||||||
class SwiftStorage(physical.PhysicalStorage):
|
class SwiftStorage(physical.PhysicalStorage):
|
||||||
|
@ -21,7 +21,6 @@ from glanceclient.common import utils as glance_utils
|
|||||||
import mock
|
import mock
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_config import fixture as cfg_fixture
|
from oslo_config import fixture as cfg_fixture
|
||||||
import six
|
|
||||||
import testtools
|
import testtools
|
||||||
|
|
||||||
from freezer.common import config
|
from freezer.common import config
|
||||||
@ -346,10 +345,7 @@ class BackupOpt1(object):
|
|||||||
self.storage = mock.MagicMock()
|
self.storage = mock.MagicMock()
|
||||||
self.engine = mock.MagicMock()
|
self.engine = mock.MagicMock()
|
||||||
opts = osclients.OpenstackOpts.create_from_env().get_opts_dicts()
|
opts = osclients.OpenstackOpts.create_from_env().get_opts_dicts()
|
||||||
self.client_manager = osclients.OSClientManager(opts.pop('auth_url'),
|
self.client_manager = osclients.OSClientManager(**opts)
|
||||||
opts.pop(
|
|
||||||
'auth_method'),
|
|
||||||
**opts)
|
|
||||||
self.client_manager.get_swift = mock.Mock(
|
self.client_manager.get_swift = mock.Mock(
|
||||||
return_value=FakeSwiftClient().client.Connection())
|
return_value=FakeSwiftClient().client.Connection())
|
||||||
self.client_manager.create_swift = self.client_manager.get_swift
|
self.client_manager.create_swift = self.client_manager.get_swift
|
||||||
@ -484,17 +480,11 @@ class FakeDisableFileSystemRedirection(object):
|
|||||||
|
|
||||||
class FreezerBaseTestCase(testtools.TestCase):
|
class FreezerBaseTestCase(testtools.TestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
if six.PY34:
|
super(FreezerBaseTestCase, self).setUp()
|
||||||
super().setUp()
|
|
||||||
else:
|
|
||||||
super(FreezerBaseTestCase, self).setUp()
|
|
||||||
|
|
||||||
self._config_fixture = self.useFixture(cfg_fixture.Config())
|
self._config_fixture = self.useFixture(cfg_fixture.Config())
|
||||||
config.config(args=[])
|
config.config(args=[])
|
||||||
self.addCleanup(CONF.reset)
|
self.addCleanup(CONF.reset)
|
||||||
|
|
||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
if six.PY34:
|
super(FreezerBaseTestCase, self).tearDown()
|
||||||
super().tearDown()
|
|
||||||
else:
|
|
||||||
super(FreezerBaseTestCase, self).tearDown()
|
|
||||||
|
@ -27,10 +27,7 @@ class TestOsClients(unittest.TestCase):
|
|||||||
auth_url="url/v3", password="password", identity_api_version="3",
|
auth_url="url/v3", password="password", identity_api_version="3",
|
||||||
insecure=False, cacert='cert', user_domain_name='Default',
|
insecure=False, cacert='cert', user_domain_name='Default',
|
||||||
project_domain_name='Default').get_opts_dicts()
|
project_domain_name='Default').get_opts_dicts()
|
||||||
self.client_manager = osclients.OSClientManager(
|
self.client_manager = osclients.OSClientManager(**self.opts)
|
||||||
auth_method=self.opts.pop('auth_method'),
|
|
||||||
auth_url=self.opts.pop('auth_url'),
|
|
||||||
**self.opts)
|
|
||||||
|
|
||||||
def test_init(self):
|
def test_init(self):
|
||||||
self.client_manager.get_cinder()
|
self.client_manager.get_cinder()
|
||||||
|
@ -6,7 +6,7 @@ hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
|
|||||||
coverage!=4.4,>=4.0 # Apache-2.0
|
coverage!=4.4,>=4.0 # Apache-2.0
|
||||||
ddt>=1.0.1 # MIT
|
ddt>=1.0.1 # MIT
|
||||||
mock>=2.0 # BSD
|
mock>=2.0 # BSD
|
||||||
pylint==1.4.5 # GPLv2
|
pylint==1.7.1 # GPLv2
|
||||||
python-subunit>=0.0.18 # Apache-2.0/BSD
|
python-subunit>=0.0.18 # Apache-2.0/BSD
|
||||||
sphinx!=1.6.1,>=1.5.1 # BSD
|
sphinx!=1.6.1,>=1.5.1 # BSD
|
||||||
oslosphinx>=4.7.0 # Apache-2.0
|
oslosphinx>=4.7.0 # Apache-2.0
|
||||||
|
Loading…
Reference in New Issue
Block a user