remove unicode from code

Change-Id: I7670da5781eba5b201c6a1e261a891b18b764fdc
This commit is contained in:
liyou01 2021-01-12 14:58:32 +08:00
parent b0d5e455fc
commit 3487d3c43e
6 changed files with 26 additions and 26 deletions

View File

@ -28,17 +28,17 @@ import sqlalchemy as sa # noqa: E402
CONSTRAINT_MAP = { CONSTRAINT_MAP = {
'hashmap_mappings': { 'hashmap_mappings': {
u'uniq_field_mapping': ( 'uniq_field_mapping': (
['value', 'field_id', 'tenant_id'], ['value', 'field_id', 'tenant_id'],
['value', 'field_id']), ['value', 'field_id']),
u'uniq_service_mapping': ( 'uniq_service_mapping': (
['value', 'service_id', 'tenant_id'], ['value', 'service_id', 'tenant_id'],
['value', 'service_id'])}, ['value', 'service_id'])},
'hashmap_thresholds': { 'hashmap_thresholds': {
u'uniq_field_threshold': ( 'uniq_field_threshold': (
['level', 'field_id', 'tenant_id'], ['level', 'field_id', 'tenant_id'],
['level', 'field_id']), ['level', 'field_id']),
u'uniq_service_threshold': ( 'uniq_service_threshold': (
['level', 'service_id', 'tenant_id'], ['level', 'service_id', 'tenant_id'],
['level', 'service_id'])}} ['level', 'service_id'])}}

View File

@ -71,10 +71,10 @@ def upgrade():
if dialect != 'postgresql': if dialect != 'postgresql':
with op.batch_alter_table('hashmap_thresholds') as batch_op: with op.batch_alter_table('hashmap_thresholds') as batch_op:
batch_op.drop_constraint( batch_op.drop_constraint(
u'uniq_field_mapping', 'uniq_field_mapping',
type_='unique') type_='unique')
batch_op.drop_constraint( batch_op.drop_constraint(
u'uniq_service_mapping', 'uniq_service_mapping',
type_='unique') type_='unique')
batch_op.create_unique_constraint( batch_op.create_unique_constraint(
'uniq_field_threshold', 'uniq_field_threshold',
@ -95,11 +95,11 @@ def upgrade():
op.rename_table('tmig_hashmap_thresholds', 'hashmap_thresholds') op.rename_table('tmig_hashmap_thresholds', 'hashmap_thresholds')
else: else:
op.drop_constraint( op.drop_constraint(
u'uniq_field_mapping', 'uniq_field_mapping',
'hashmap_thresholds', 'hashmap_thresholds',
type_='unique') type_='unique')
op.drop_constraint( op.drop_constraint(
u'uniq_service_mapping', 'uniq_service_mapping',
'hashmap_thresholds', 'hashmap_thresholds',
type_='unique') type_='unique')
op.create_unique_constraint( op.create_unique_constraint(

View File

@ -31,17 +31,17 @@ import sqlalchemy as sa # noqa: E402
CONSTRAINT_MAP = { CONSTRAINT_MAP = {
'hashmap_mappings': { 'hashmap_mappings': {
u'uniq_field_mapping': ( 'uniq_field_mapping': (
['value', 'field_id', 'tenant_id'], ['value', 'field_id', 'tenant_id'],
['value', 'field_id']), ['value', 'field_id']),
u'uniq_service_mapping': ( 'uniq_service_mapping': (
['value', 'service_id', 'tenant_id'], ['value', 'service_id', 'tenant_id'],
['value', 'service_id'])}, ['value', 'service_id'])},
'hashmap_thresholds': { 'hashmap_thresholds': {
u'uniq_field_threshold': ( 'uniq_field_threshold': (
['level', 'field_id', 'tenant_id'], ['level', 'field_id', 'tenant_id'],
['level', 'field_id']), ['level', 'field_id']),
u'uniq_service_threshold': ( 'uniq_service_threshold': (
['level', 'service_id', 'tenant_id'], ['level', 'service_id', 'tenant_id'],
['level', 'service_id'])}} ['level', 'service_id'])}}

View File

@ -42,7 +42,7 @@ def upgrade():
name='fk_hashmap_fields_service_id_hashmap_services'), name='fk_hashmap_fields_service_id_hashmap_services'),
nullable=False)]) as batch_op: nullable=False)]) as batch_op:
batch_op.drop_constraint( batch_op.drop_constraint(
u'uniq_field', 'uniq_field',
type_='unique') type_='unique')
batch_op.create_unique_constraint( batch_op.create_unique_constraint(
'uniq_field_per_service', 'uniq_field_per_service',

View File

@ -84,7 +84,7 @@ source_suffix = '.rst'
master_doc = 'index' master_doc = 'index'
# General information about the project. # General information about the project.
copyright = u'2014-present, OpenStack Foundation.' copyright = '2014-present, OpenStack Foundation.'
# The language for content autogenerated by Sphinx. Refer to documentation # The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages. # for a list of supported languages.
@ -130,8 +130,8 @@ modindex_common_prefix = ['cloudkitty.']
# List of tuples 'sourcefile', 'target', u'title', u'Authors name', 'manual' # List of tuples 'sourcefile', 'target', u'title', u'Authors name', 'manual'
man_pages = [ man_pages = [
('index', 'cloudkitty', u'cloudkitty Documentation', ('index', 'cloudkitty', 'cloudkitty Documentation',
[u'Objectif Libre'], 1) ['Objectif Libre'], 1)
] ]
# -- Options for HTML output ------------------------------------------------- # -- Options for HTML output -------------------------------------------------
@ -221,8 +221,8 @@ htmlhelp_basename = 'cloudkittydoc'
# (source start file, target name, title, author, # (source start file, target name, title, author,
# documentclass [howto/manual]). # documentclass [howto/manual]).
latex_documents = [ latex_documents = [
('pdf-index', 'doc-cloudkitty.tex', u'Cloudkitty Documentation', ('pdf-index', 'doc-cloudkitty.tex', 'Cloudkitty Documentation',
u'Cloudkitty Team', 'manual'), 'Cloudkitty Team', 'manual'),
] ]
# The name of an image file (relative to this directory) to place at the top of # The name of an image file (relative to this directory) to place at the top of

View File

@ -42,8 +42,8 @@ source_suffix = '.rst'
master_doc = 'index' master_doc = 'index'
# General information about the project. # General information about the project.
project = u'Cloudkitty Client Release Notes' project = 'Cloudkitty Client Release Notes'
copyright = u'2016, Cloudkitty developers' copyright = '2016, Cloudkitty developers'
# Release notes are version independent. # Release notes are version independent.
# The short X.Y version. # The short X.Y version.
@ -188,8 +188,8 @@ latex_elements = {
# (source start file, target name, title, # (source start file, target name, title,
# author, documentclass [howto, manual, or own class]). # author, documentclass [howto, manual, or own class]).
latex_documents = [ latex_documents = [
('index', 'PythonCloudkitty.tex', u'Cloudkitty Release Notes Documentation', ('index', 'PythonCloudkitty.tex', 'Cloudkitty Release Notes Documentation',
u'Cloudkitty developers', 'manual'), 'Cloudkitty developers', 'manual'),
] ]
# The name of an image file (relative to this directory) to place at the top of # The name of an image file (relative to this directory) to place at the top of
@ -219,8 +219,8 @@ latex_documents = [
# (source start file, name, description, authors, manual section). # (source start file, name, description, authors, manual section).
man_pages = [ man_pages = [
('index', 'cloudkitty', ('index', 'cloudkitty',
u'Cloudkitty Release Notes Documentation', 'Cloudkitty Release Notes Documentation',
[u'Cloudkitty developers'], 1) ['Cloudkitty developers'], 1)
] ]
# If true, show URL addresses after external links. # If true, show URL addresses after external links.
@ -234,8 +234,8 @@ man_pages = [
# dir menu entry, description, category) # dir menu entry, description, category)
texinfo_documents = [ texinfo_documents = [
('index', 'cloudkitty', ('index', 'cloudkitty',
u'Cloudkitty Release Notes Documentation', 'Cloudkitty Release Notes Documentation',
u'Cloudkitty developers', 'Cloudkitty', 'Cloudkitty developers', 'Cloudkitty',
'One line description of project.', 'Miscellaneous'), 'One line description of project.', 'Miscellaneous'),
] ]