summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2021-04-16 12:03:36 +0000
committerGerrit Code Review <review@openstack.org>2021-04-16 12:03:36 +0000
commit56f819898b873a84f44b532047a7a25ee21f7885 (patch)
treed3e17d3b864f36a5c3946f19912b6036d91e68ff
parent8b657ae9e31db07f0c4e7d719a16806716c9041a (diff)
parent604bde417bba86d4f184d3469e33f92e7fc8eed9 (diff)
downloadoslo-config-56f819898b873a84f44b532047a7a25ee21f7885.tar.gz
Merge "remove unicode from code"
-rw-r--r--doc/source/conf.py2
-rw-r--r--oslo_config/generator.py6
-rw-r--r--oslo_config/tests/test_get_location.py2
-rw-r--r--releasenotes/source/conf.py10
4 files changed, 9 insertions, 11 deletions
diff --git a/doc/source/conf.py b/doc/source/conf.py
index 3535e20..975740f 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -51,7 +51,7 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
-copyright = u'2013, OpenStack Foundation'
+copyright = '2013, OpenStack Foundation'
# If true, '()' will be appended to :func: etc. cross-reference text.
add_function_parentheses = True
diff --git a/oslo_config/generator.py b/oslo_config/generator.py
index 9fdde09..9845c81 100644
--- a/oslo_config/generator.py
+++ b/oslo_config/generator.py
@@ -288,11 +288,9 @@ class _OptFormatter:
else:
opt_help = opt.help
- help_text = u'%s%s (%s)' % (opt_prefix,
- opt_help,
- opt_type)
+ help_text = '%s%s (%s)' % (opt_prefix, opt_help, opt_type)
else:
- help_text = u'(%s)' % opt_type
+ help_text = '(%s)' % opt_type
lines = self._format_help(help_text)
if getattr(opt.type, 'min', None) is not None:
diff --git a/oslo_config/tests/test_get_location.py b/oslo_config/tests/test_get_location.py
index 9541708..d06271a 100644
--- a/oslo_config/tests/test_get_location.py
+++ b/oslo_config/tests/test_get_location.py
@@ -137,7 +137,7 @@ class GetLocationTestCase(base.BaseTestCase):
def _write_opt_to_tmp_file(self, group, option, value):
filename = tempfile.mktemp()
with io.open(filename, 'w', encoding='utf-8') as f:
- f.write(textwrap.dedent(u'''
+ f.write(textwrap.dedent('''
[{group}]
{option} = {value}
''').format(
diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py
index 92eb659..8fd6fe9 100644
--- a/releasenotes/source/conf.py
+++ b/releasenotes/source/conf.py
@@ -60,7 +60,7 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
-copyright = u'2016, oslo.config Developers'
+copyright = '2016, oslo.config Developers'
# Release notes do not need a version in the title, they span
# multiple versions.
@@ -196,8 +196,8 @@ html_static_path = ['_static']
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'oslo.configreleasenotes',
- u'oslo.config Release Notes Documentation',
- [u'oslo.config Developers'], 1)
+ 'oslo.config Release Notes Documentation',
+ ['oslo.config Developers'], 1)
]
# If true, show URL addresses after external links.
@@ -211,8 +211,8 @@ man_pages = [
# dir menu entry, description, category)
texinfo_documents = [
('index', 'oslo.configReleaseNotes',
- u'oslo.config Release Notes Documentation',
- u'oslo.config Developers', 'oslo.configReleaseNotes',
+ 'oslo.config Release Notes Documentation',
+ 'oslo.config Developers', 'oslo.configReleaseNotes',
'An OpenStack library for parsing configuration options from the command'
' line and configuration files.',
'Miscellaneous'),