From ddf12d559d012015d4b3d35dc0f7e4aac4660807 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Beraud?= Date: Wed, 20 Apr 2022 12:10:46 +0200 Subject: [PATCH] Remove unnecessary unicode prefixes Change-Id: I4b6815bad979e19bda2d59ac37c51f592dc385e8 --- .../functional/api/v2/test_alarm_scenarios.py | 4 ++-- aodh/tests/unit/test_coordination.py | 18 ++++++++--------- doc/source/admin/telemetry-alarms.rst | 8 ++++---- doc/source/conf.py | 20 +++++++++---------- releasenotes/source/conf.py | 14 ++++++------- 5 files changed, 32 insertions(+), 32 deletions(-) diff --git a/aodh/tests/functional/api/v2/test_alarm_scenarios.py b/aodh/tests/functional/api/v2/test_alarm_scenarios.py index 78e11153f..f1e671e2a 100644 --- a/aodh/tests/functional/api/v2/test_alarm_scenarios.py +++ b/aodh/tests/functional/api/v2/test_alarm_scenarios.py @@ -1925,7 +1925,7 @@ class TestAlarmsHistory(TestAlarmsBase): " {value!r} Unset>], valid keys: ['project', " "'search_offset', 'severity', 'timestamp'," " 'type', 'user']") - msg = msg.format(key=u'alarm_id', value=u'a') + msg = msg.format(key='alarm_id', value='a') self.assertEqual(msg, resp.json['error_message']['faultstring']) @@ -1938,7 +1938,7 @@ class TestAlarmsHistory(TestAlarmsBase): " {value!r} Unset>], valid keys: ['project', " "'search_offset', 'severity', 'timestamp'," " 'type', 'user']") - msg = msg.format(key=u'abcd', value=u'abcd') + msg = msg.format(key='abcd', value='abcd') self.assertEqual(msg, resp.json['error_message']['faultstring']) diff --git a/aodh/tests/unit/test_coordination.py b/aodh/tests/unit/test_coordination.py index 42da53a0a..0be6bff95 100644 --- a/aodh/tests/unit/test_coordination.py +++ b/aodh/tests/unit/test_coordination.py @@ -225,9 +225,9 @@ class TestPartitioning(base.BaseTestCase): expected_resources=[], coordinator_cls=MockToozCoordExceptionRaiser)] self._usage_simulation(*agents) - called = [mock.call(u'Error connecting to coordination backend.'), - mock.call(u'Error getting group membership info from ' - u'coordination backend.')] + called = [mock.call('Error connecting to coordination backend.'), + mock.call('Error getting group membership info from ' + 'coordination backend.')] self.assertEqual(called, mocked_exception.call_args_list) @mock.patch.object(coordination.LOG, 'exception') @@ -238,16 +238,16 @@ class TestPartitioning(base.BaseTestCase): with mock.patch('tooz.coordination.get_coordinator', return_value=MockToozCoordExceptionRaiser('a', {})): coord.heartbeat() - called = [mock.call(u'Error connecting to coordination backend.'), - mock.call(u'Error connecting to coordination backend.'), - mock.call(u'Error sending a heartbeat to coordination ' - u'backend.')] + called = [mock.call('Error connecting to coordination backend.'), + mock.call('Error connecting to coordination backend.'), + mock.call('Error sending a heartbeat to coordination ' + 'backend.')] self.assertEqual(called, mocked_exception.call_args_list) with mock.patch('tooz.coordination.get_coordinator', return_value=MockToozCoordinator('a', {})): coord.heartbeat() - mock_info.assert_called_with(u'Coordination backend started ' - u'successfully.') + mock_info.assert_called_with('Coordination backend started ' + 'successfully.') def test_group_id_none(self): coord = self._get_new_started_coordinator({}, 'a') diff --git a/doc/source/admin/telemetry-alarms.rst b/doc/source/admin/telemetry-alarms.rst index 0df2d0753..2e75a9a03 100644 --- a/doc/source/admin/telemetry-alarms.rst +++ b/doc/source/admin/telemetry-alarms.rst @@ -305,14 +305,14 @@ Sample output of alarm type **event**: +---------------------------+---------------------------------------------------------------+ | Field | Value | +---------------------------+---------------------------------------------------------------+ - | alarm_actions | [u'log://'] | + | alarm_actions | ['log://'] | | alarm_id | 15c0da26-524d-40ad-8fba-3e55ee0ddc91 | | description | Instance powered ON but in error state | | enabled | True | | event_type | compute.instance.power_on.* | - | insufficient_data_actions | [u'log://'] | + | insufficient_data_actions | ['log://'] | | name | instance_on_state_err | - | ok_actions | [u'log://'] | + | ok_actions | ['log://'] | | project_id | 9ee200732f4c4d10a6530bac746f1b6e | | query | traits.instance_id = bb912729-fa51-443b-bac6-bf4c795f081d AND | | | traits.state = error | @@ -343,7 +343,7 @@ brevity): +----------+-----------+--------+-------------------+----------+---------+ | alarm_id | type | name | state | severity | enabled | +----------+-----------+--------+-------------------+----------+---------+ - | ALARM_ID | threshold | cpu_hi | insufficient data | low | True | + | ALARM_ID | threshold | cpu_hi | insufficient data | low | True | +----------+-----------+--------+-------------------+----------+---------+ In this case, the state is reported as ``insufficient data`` which diff --git a/doc/source/conf.py b/doc/source/conf.py index 03ed7eca8..37d9f6d14 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -75,7 +75,7 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. -copyright = u'2012-2015, OpenStack Foundation' +copyright = '2012-2015, OpenStack Foundation' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -199,8 +199,8 @@ htmlhelp_basename = 'Aodhdoc' # (source start file, target name, title, author, documentclass # [howto/manual]). latex_documents = [ - ('index', 'doc-aodh.tex', u'Aodh Documentation', - u'OpenStack Foundation', 'manual'), + ('index', 'doc-aodh.tex', 'Aodh Documentation', + 'OpenStack Foundation', 'manual'), ] latex_elements = { @@ -244,8 +244,8 @@ latex_domain_indices = False # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - ('index', 'aodh', u'Aodh Documentation', - [u'OpenStack'], 1) + ('index', 'aodh', 'Aodh Documentation', + ['OpenStack'], 1) ] # If true, show URL addresses after external links. @@ -258,7 +258,7 @@ man_pages = [ # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - ('index', 'Aodh', u'Aodh Documentation', u'OpenStack', + ('index', 'Aodh', 'Aodh Documentation', 'OpenStack', 'Aodh', 'One line description of project.', 'Miscellaneous'), ] @@ -275,10 +275,10 @@ texinfo_documents = [ # -- Options for Epub output -------------------------------------------------- # Bibliographic Dublin Core info. -epub_title = u'Aodh' -epub_author = u'OpenStack' -epub_publisher = u'OpenStack' -epub_copyright = u'2012-2015, OpenStack' +epub_title = 'Aodh' +epub_author = 'OpenStack' +epub_publisher = 'OpenStack' +epub_copyright = '2012-2015, OpenStack' # The language of the text. It defaults to the language option # or en if the language is not set. diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py index b494711af..c08c6ab19 100644 --- a/releasenotes/source/conf.py +++ b/releasenotes/source/conf.py @@ -55,7 +55,7 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. -copyright = u'2015, Aodh Developers' +copyright = '2015, Aodh Developers' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -188,8 +188,8 @@ htmlhelp_basename = 'AodhReleaseNotesdoc' # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - ('index', 'AodhReleaseNotes.tex', u'Aodh Release Notes Documentation', - u'Aodh Developers', 'manual'), + ('index', 'AodhReleaseNotes.tex', 'Aodh Release Notes Documentation', + 'Aodh Developers', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of @@ -218,8 +218,8 @@ latex_documents = [ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - ('index', 'aodhreleasenotes', u'Aodh Release Notes Documentation', - [u'Aodh Developers'], 1) + ('index', 'aodhreleasenotes', 'Aodh Release Notes Documentation', + ['Aodh Developers'], 1) ] # If true, show URL addresses after external links. @@ -232,8 +232,8 @@ man_pages = [ # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - ('index', 'AodhReleaseNotes', u'Aodh Release Notes Documentation', - u'Aodh Developers', 'AodhReleaseNotes', + ('index', 'AodhReleaseNotes', 'Aodh Release Notes Documentation', + 'Aodh Developers', 'AodhReleaseNotes', 'One line description of project.', 'Miscellaneous'), ]