From e41b382afd953248a56b56af2dac0e24953d6b89 Mon Sep 17 00:00:00 2001 From: Manpreet Kaur Date: Sat, 30 Jan 2021 13:54:14 +0530 Subject: [PATCH] Dropping explicit unicode literal In python 3, all strings are considered as unicode string. This patch drops the explicit unicode literal (u'...') or (u"..") appearances from the unicode strings. Change-Id: Iaa040f10028935782d8315efc81d344e72b2a152 --- doc/source/conf.py | 6 +++--- translator/hot/syntax/hot_resource.py | 2 +- translator/hot/syntax/hot_template.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 5ae59706..c4f994e8 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -35,7 +35,7 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. -copyright = u'2013, OpenStack Foundation' +copyright = '2013, OpenStack Foundation' # openstackdocstheme options openstackdocs_repo_name = 'openstack/heat-translator' @@ -63,8 +63,8 @@ htmlhelp_basename = 'heat-translatordoc' latex_documents = [ ('index', 'heat-translator.tex', - u'heat-translator Documentation', - u'OpenStack Foundation', 'manual'), + 'heat-translator Documentation', + 'OpenStack Foundation', 'manual'), ] # Example configuration for intersphinx: refer to the Python standard library. diff --git a/translator/hot/syntax/hot_resource.py b/translator/hot/syntax/hot_resource.py index e69cb4d6..da13d77e 100644 --- a/translator/hot/syntax/hot_resource.py +++ b/translator/hot/syntax/hot_resource.py @@ -479,7 +479,7 @@ class HotResource(object): node_key = dumper.represent_data(key) node_value = dumper.represent_data(value) nodes.append((node_key, node_value)) - return yaml.nodes.MappingNode(u'tag:yaml.org,2002:map', nodes) + return yaml.nodes.MappingNode('tag:yaml.org,2002:map', nodes) def _handle_nested_template(self, scale_res, yaml_name, hot_template_parameters, diff --git a/translator/hot/syntax/hot_template.py b/translator/hot/syntax/hot_template.py index 7fae0220..c84472be 100644 --- a/translator/hot/syntax/hot_template.py +++ b/translator/hot/syntax/hot_template.py @@ -43,7 +43,7 @@ class HotTemplate(object): node_key = dumper.represent_data(key) node_value = dumper.represent_data(value) nodes.append((node_key, node_value)) - return yaml.nodes.MappingNode(u'tag:yaml.org,2002:map', nodes) + return yaml.nodes.MappingNode('tag:yaml.org,2002:map', nodes) def output_to_yaml_files_dict(self, base_filename, hot_template_version=LATEST):