Fix noqa
Change I68efbde4e9dd2e6e9455d91313eb45c9c79d35ce added a noqa to silence flake 3.6.0. A better way is to fix the line completely and use a raw string for the regex. Change-Id: Iaa7486ee11fdf6d97597c6c3bc6403677d499429
This commit is contained in:
parent
93dadcb0db
commit
8641fd55a1
|
@ -120,7 +120,7 @@ class ReferenceResolver(object):
|
|||
reference
|
||||
"""
|
||||
ks_sess = ks_utils.get_keystone_session()
|
||||
(new_scheme, foo) = re.subn('^[^+]+\+', '', design_uri.scheme) # noqa
|
||||
(new_scheme, foo) = re.subn(r'^[^+]+\+', '', design_uri.scheme)
|
||||
url = urllib.parse.urlunparse(
|
||||
(new_scheme, design_uri.netloc, design_uri.path, design_uri.params,
|
||||
design_uri.query, design_uri.fragment))
|
||||
|
|
|
@ -461,9 +461,8 @@ class ChartBuilderNegativeTestCase(BaseChartBuilderTestCase):
|
|||
chartbuilder = ChartBuilder(test_chart)
|
||||
|
||||
# Confirm it failed for both encodings.
|
||||
error_re = (
|
||||
r'.*A str exception occurred while trying to read file:' # noqa
|
||||
'.*Details:\n.*\(encoding=utf-8\).*\n\(encoding=latin1\)')
|
||||
error_re = (r'.*A str exception occurred while trying to read file:'
|
||||
r'.*Details:\n.*\(encoding=utf-8\).*\n\(encoding=latin1\)')
|
||||
with mock.patch("builtins.open", mock.mock_open(read_data="")) \
|
||||
as mock_file:
|
||||
mock_file.return_value.read.side_effect = self.exc_to_raise
|
||||
|
|
Loading…
Reference in New Issue