From fe2abe1130ea0cdfb657d15fbb545acc4d5a026e Mon Sep 17 00:00:00 2001 From: LiZekun <2954674728@qq.com> Date: Sun, 5 Jun 2022 09:07:52 +0800 Subject: [PATCH] Remove unicode literal from code All strings are considered as unicode literal string from Python 3. This patch drops the explicit unicode literal (u'...') appearances from the unicode strings. Change-Id: I662c72686a7e0404da62fb677c666885ff5ac65a --- api-ref/source/conf.py | 6 +++--- doc/source/conf.py | 6 +++--- ironic_inspector/test/functional.py | 6 +++--- releasenotes/source/conf.py | 16 ++++++++-------- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/api-ref/source/conf.py b/api-ref/source/conf.py index 3908886c0..bd5a10d6f 100644 --- a/api-ref/source/conf.py +++ b/api-ref/source/conf.py @@ -100,7 +100,7 @@ pygments_style = 'native' # -- Options for man page output ---------------------------------------------- # Grouping the document tree for man pages. -# List of tuples 'sourcefile', 'target', u'title', u'Authors name', 'manual' +# List of tuples 'sourcefile', 'target', title', 'Authors name', 'manual' # -- Options for HTML output -------------------------------------------------- @@ -188,8 +188,8 @@ htmlhelp_basename = 'IronicInspectorAPIRefdoc' latex_documents = [ ('index', '%s.tex' % project, - u'OpenStack Hardware Introspection API Documentation', - u'OpenStack Foundation', 'manual'), + 'OpenStack Hardware Introspection API Documentation', + 'OpenStack Foundation', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of diff --git a/doc/source/conf.py b/doc/source/conf.py index 83601ec82..f8354c4ee 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -49,7 +49,7 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. -copyright = u'OpenStack Developers' +copyright = 'OpenStack Developers' config_generator_config_file = '../../tools/config-generator.conf' sample_config_basename = '_static/ironic-inspector' @@ -112,8 +112,8 @@ latex_documents = [ ( 'index', 'doc-ironic-inspector.tex', - u'Ironic Inspector Documentation', - u'OpenStack Foundation', + 'Ironic Inspector Documentation', + 'OpenStack Foundation', 'manual' ), ] diff --git a/ironic_inspector/test/functional.py b/ironic_inspector/test/functional.py index 9498a81b8..7e95d8403 100644 --- a/ironic_inspector/test/functional.py +++ b/ironic_inspector/test/functional.py @@ -218,9 +218,9 @@ class Base(base.NodeTest): return {'uuid': self.uuid, 'finished': finished, 'error': error, 'state': state, 'finished_at': finished_at, 'started_at': started_at, - 'links': [{u'href': u'%s/v1/introspection/%s' % (self.ROOT_URL, - self.uuid), - u'rel': u'self'}]} + 'links': [{'href': '%s/v1/introspection/%s' % (self.ROOT_URL, + self.uuid), + 'rel': 'self'}]} def check_status(self, status, finished, state, error=None): self.assertEqual( diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py index 12ec71842..d4b8c4a75 100644 --- a/releasenotes/source/conf.py +++ b/releasenotes/source/conf.py @@ -64,8 +64,8 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. -project = u'Ironic Inspector Release Notes' -copyright = u'2015, Ironic Inspector Developers' +project = 'Ironic Inspector Release Notes' +copyright = '2015, Ironic Inspector Developers' # Release notes are version independent. # The short X.Y version. @@ -218,8 +218,8 @@ latex_elements = { # author, documentclass [howto, manual, or own class]). latex_documents = [ ('index', 'IronicInspectorReleaseNotes.tex', - u'Ironic Inspector Release Notes Documentation', - u'Ironic Inspector Developers', 'manual'), + 'Ironic Inspector Release Notes Documentation', + 'Ironic Inspector Developers', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of @@ -249,8 +249,8 @@ latex_documents = [ # (source start file, name, description, authors, manual section). man_pages = [ ('index', 'ironicinspectorreleasenotes', - u'Ironic Inspector Release Notes Documentation', - [u'Ironic Inspector Developers'], 1) + 'Ironic Inspector Release Notes Documentation', + ['Ironic Inspector Developers'], 1) ] # If true, show URL addresses after external links. @@ -264,8 +264,8 @@ man_pages = [ # dir menu entry, description, category) texinfo_documents = [ ('index', 'IronicInspectorReleaseNotes', - u'Ironic Inspector Release Notes Documentation', - u'Ironic Inspector Developers', 'IronicInspectorReleaseNotes', + 'Ironic Inspector Release Notes Documentation', + 'Ironic Inspector Developers', 'IronicInspectorReleaseNotes', 'One line description of project.', 'Miscellaneous'), ]