From 70566f48610c5917f9b24b9804f843a76a4effef Mon Sep 17 00:00:00 2001 From: Manpreet Kaur Date: Sat, 30 Jan 2021 15:52:53 +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: I50655850fe2d1baf34dee9938f35c92266ccab83 --- doc/source/conf.py | 10 +-- .../dashboards/nfv/nscatalog/tables.py | 8 +-- .../dashboards/nfv/nsmanager/tables.py | 8 +-- .../dashboards/nfv/vim/tables.py | 8 +-- .../dashboards/nfv/vnfcatalog/tables.py | 8 +-- .../dashboards/nfv/vnffgcatalog/tables.py | 8 +-- .../dashboards/nfv/vnffgmanager/tables.py | 68 +++++++++---------- .../dashboards/nfv/vnfmanager/tables.py | 68 +++++++++---------- 8 files changed, 93 insertions(+), 93 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 5d028d6..c53ccc4 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -37,7 +37,7 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. -copyright = u'2018, OpenStack Developers' +copyright = '2018, OpenStack Developers' # openstackdocstheme options openstackdocs_repo_name = 'openstack/tacker-horizon' @@ -75,15 +75,15 @@ htmlhelp_basename = 'tacker-horizon' latex_documents = [ ('index', 'doc-tacker-horizon.tex', - u'Tacker-Horizon Documentation', - u'OpenStack Developers', 'howto', True), + 'Tacker-Horizon Documentation', + 'OpenStack Developers', 'howto', True), ] man_pages = [ - ('index', u'Tacker Horizon Documentation', + ('index', 'Tacker Horizon Documentation', 'Documentation for Tacker Horizon plugin to Openstack\ Dashboard (Horizon)', - [u'OpenStack'], 1) + ['OpenStack'], 1) ] # Example configuration for intersphinx: refer to the Python standard library. diff --git a/tacker_horizon/openstack_dashboard/dashboards/nfv/nscatalog/tables.py b/tacker_horizon/openstack_dashboard/dashboards/nfv/nscatalog/tables.py index 72478b8..a9a9ae4 100644 --- a/tacker_horizon/openstack_dashboard/dashboards/nfv/nscatalog/tables.py +++ b/tacker_horizon/openstack_dashboard/dashboards/nfv/nscatalog/tables.py @@ -28,16 +28,16 @@ class DeleteNSD(policy.PolicyTargetMixin, tables.DeleteAction): @staticmethod def action_present(count): return ungettext_lazy( - u"Delete NS", - u"Delete NSs", + "Delete NS", + "Delete NSs", count ) @staticmethod def action_past(count): return ungettext_lazy( - u"Delete NS", - u"Delete NSs", + "Delete NS", + "Delete NSs", count ) diff --git a/tacker_horizon/openstack_dashboard/dashboards/nfv/nsmanager/tables.py b/tacker_horizon/openstack_dashboard/dashboards/nfv/nsmanager/tables.py index a3a9afa..8fbecac 100644 --- a/tacker_horizon/openstack_dashboard/dashboards/nfv/nsmanager/tables.py +++ b/tacker_horizon/openstack_dashboard/dashboards/nfv/nsmanager/tables.py @@ -109,16 +109,16 @@ class DeleteNS(policy.PolicyTargetMixin, tables.DeleteAction): @staticmethod def action_present(count): return ungettext_lazy( - u"Terminate NS", - u"Terminate NSs", + "Terminate NS", + "Terminate NSs", count ) @staticmethod def action_past(count): return ungettext_lazy( - u"Terminate NS", - u"Terminate NSs", + "Terminate NS", + "Terminate NSs", count ) diff --git a/tacker_horizon/openstack_dashboard/dashboards/nfv/vim/tables.py b/tacker_horizon/openstack_dashboard/dashboards/nfv/vim/tables.py index 040c043..b90ea35 100644 --- a/tacker_horizon/openstack_dashboard/dashboards/nfv/vim/tables.py +++ b/tacker_horizon/openstack_dashboard/dashboards/nfv/vim/tables.py @@ -30,16 +30,16 @@ class DeleteVIMLink(policy.PolicyTargetMixin, tables.DeleteAction): @staticmethod def action_present(count): return ungettext_lazy( - u"Delete VIM", - u"Delete VIMs", + "Delete VIM", + "Delete VIMs", count ) @staticmethod def action_past(count): return ungettext_lazy( - u"Delete VIM", - u"Delete VIMs", + "Delete VIM", + "Delete VIMs", count ) diff --git a/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfcatalog/tables.py b/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfcatalog/tables.py index afe9863..63bede3 100644 --- a/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfcatalog/tables.py +++ b/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfcatalog/tables.py @@ -30,16 +30,16 @@ class DeleteVNFD(policy.PolicyTargetMixin, tables.DeleteAction): @staticmethod def action_present(count): return ungettext_lazy( - u"Delete VNF", - u"Delete VNFs", + "Delete VNF", + "Delete VNFs", count ) @staticmethod def action_past(count): return ungettext_lazy( - u"Delete VNF", - u"Delete VNFs", + "Delete VNF", + "Delete VNFs", count ) diff --git a/tacker_horizon/openstack_dashboard/dashboards/nfv/vnffgcatalog/tables.py b/tacker_horizon/openstack_dashboard/dashboards/nfv/vnffgcatalog/tables.py index be220b3..4e0f82b 100644 --- a/tacker_horizon/openstack_dashboard/dashboards/nfv/vnffgcatalog/tables.py +++ b/tacker_horizon/openstack_dashboard/dashboards/nfv/vnffgcatalog/tables.py @@ -28,16 +28,16 @@ class DeleteVNFFGD(policy.PolicyTargetMixin, tables.DeleteAction): @staticmethod def action_present(count): return ungettext_lazy( - u"Delete VNFFG", - u"Delete VNFFGs", + "Delete VNFFG", + "Delete VNFFGs", count ) @staticmethod def action_past(count): return ungettext_lazy( - u"Delete VNFFG", - u"Delete VNFFGs", + "Delete VNFFG", + "Delete VNFFGs", count ) diff --git a/tacker_horizon/openstack_dashboard/dashboards/nfv/vnffgmanager/tables.py b/tacker_horizon/openstack_dashboard/dashboards/nfv/vnffgmanager/tables.py index 6d777a2..3db2aa4 100644 --- a/tacker_horizon/openstack_dashboard/dashboards/nfv/vnffgmanager/tables.py +++ b/tacker_horizon/openstack_dashboard/dashboards/nfv/vnffgmanager/tables.py @@ -98,16 +98,16 @@ class DeleteVNFFG(policy.PolicyTargetMixin, tables.DeleteAction): @staticmethod def action_present(count): return ungettext_lazy( - u"Terminate VNFFG", - u"Terminate VNFFGs", + "Terminate VNFFG", + "Terminate VNFFGs", count ) @staticmethod def action_past(count): return ungettext_lazy( - u"Terminate VNFFG", - u"Terminate VNFFGs", + "Terminate VNFFG", + "Terminate VNFFGs", count ) @@ -130,65 +130,65 @@ class VNFFGManagerTable(tables.DataTable): ) STACK_STATUS_DISPLAY_CHOICES = ( ("init_in_progress", pgettext_lazy("current status of stack", - u"Init In Progress")), + "Init In Progress")), ("init_complete", pgettext_lazy("current status of stack", - u"Init Complete")), + "Init Complete")), ("init_failed", pgettext_lazy("current status of stack", - u"Init Failed")), + "Init Failed")), ("create_in_progress", pgettext_lazy("current status of stack", - u"Create In Progress")), + "Create In Progress")), ("create_complete", pgettext_lazy("current status of stack", - u"Create Complete")), + "Create Complete")), ("create_failed", pgettext_lazy("current status of stack", - u"Create Failed")), + "Create Failed")), ("delete_in_progress", pgettext_lazy("current status of stack", - u"Delete In Progress")), + "Delete In Progress")), ("delete_complete", pgettext_lazy("current status of stack", - u"Delete Complete")), + "Delete Complete")), ("delete_failed", pgettext_lazy("current status of stack", - u"Delete Failed")), + "Delete Failed")), ("update_in_progress", pgettext_lazy("current status of stack", - u"Update In Progress")), + "Update In Progress")), ("update_complete", pgettext_lazy("current status of stack", - u"Update Complete")), + "Update Complete")), ("update_failed", pgettext_lazy("current status of stack", - u"Update Failed")), + "Update Failed")), ("rollback_in_progress", pgettext_lazy("current status of stack", - u"Rollback In Progress")), + "Rollback In Progress")), ("rollback_complete", pgettext_lazy("current status of stack", - u"Rollback Complete")), + "Rollback Complete")), ("rollback_failed", pgettext_lazy("current status of stack", - u"Rollback Failed")), + "Rollback Failed")), ("suspend_in_progress", pgettext_lazy("current status of stack", - u"Suspend In Progress")), + "Suspend In Progress")), ("suspend_complete", pgettext_lazy("current status of stack", - u"Suspend Complete")), + "Suspend Complete")), ("suspend_failed", pgettext_lazy("current status of stack", - u"Suspend Failed")), + "Suspend Failed")), ("resume_in_progress", pgettext_lazy("current status of stack", - u"Resume In Progress")), + "Resume In Progress")), ("resume_complete", pgettext_lazy("current status of stack", - u"Resume Complete")), + "Resume Complete")), ("resume_failed", pgettext_lazy("current status of stack", - u"Resume Failed")), + "Resume Failed")), ("adopt_in_progress", pgettext_lazy("current status of stack", - u"Adopt In Progress")), + "Adopt In Progress")), ("adopt_complete", pgettext_lazy("current status of stack", - u"Adopt Complete")), + "Adopt Complete")), ("adopt_failed", pgettext_lazy("current status of stack", - u"Adopt Failed")), + "Adopt Failed")), ("snapshot_in_progress", pgettext_lazy("current status of stack", - u"Snapshot In Progress")), + "Snapshot In Progress")), ("snapshot_complete", pgettext_lazy("current status of stack", - u"Snapshot Complete")), + "Snapshot Complete")), ("snapshot_failed", pgettext_lazy("current status of stack", - u"Snapshot Failed")), + "Snapshot Failed")), ("check_in_progress", pgettext_lazy("current status of stack", - u"Check In Progress")), + "Check In Progress")), ("check_complete", pgettext_lazy("current status of stack", - u"Check Complete")), + "Check Complete")), ("check_failed", pgettext_lazy("current status of stack", - u"Check Failed")), + "Check Failed")), ) name = tables.Column("name", link="horizon:nfv:vnffgmanager:detail", diff --git a/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfmanager/tables.py b/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfmanager/tables.py index 0489789..fdfc825 100644 --- a/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfmanager/tables.py +++ b/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfmanager/tables.py @@ -143,16 +143,16 @@ class DeleteVNF(policy.PolicyTargetMixin, tables.DeleteAction): @staticmethod def action_present(count): return ungettext_lazy( - u"Terminate VNF", - u"Terminate VNFs", + "Terminate VNF", + "Terminate VNFs", count ) @staticmethod def action_past(count): return ungettext_lazy( - u"Terminate VNF", - u"Terminate VNFs", + "Terminate VNF", + "Terminate VNFs", count ) @@ -175,65 +175,65 @@ class VNFManagerTable(tables.DataTable): ) STACK_STATUS_DISPLAY_CHOICES = ( ("init_in_progress", pgettext_lazy("current status of stack", - u"Init In Progress")), + "Init In Progress")), ("init_complete", pgettext_lazy("current status of stack", - u"Init Complete")), + "Init Complete")), ("init_failed", pgettext_lazy("current status of stack", - u"Init Failed")), + "Init Failed")), ("create_in_progress", pgettext_lazy("current status of stack", - u"Create In Progress")), + "Create In Progress")), ("create_complete", pgettext_lazy("current status of stack", - u"Create Complete")), + "Create Complete")), ("create_failed", pgettext_lazy("current status of stack", - u"Create Failed")), + "Create Failed")), ("delete_in_progress", pgettext_lazy("current status of stack", - u"Delete In Progress")), + "Delete In Progress")), ("delete_complete", pgettext_lazy("current status of stack", - u"Delete Complete")), + "Delete Complete")), ("delete_failed", pgettext_lazy("current status of stack", - u"Delete Failed")), + "Delete Failed")), ("update_in_progress", pgettext_lazy("current status of stack", - u"Update In Progress")), + "Update In Progress")), ("update_complete", pgettext_lazy("current status of stack", - u"Update Complete")), + "Update Complete")), ("update_failed", pgettext_lazy("current status of stack", - u"Update Failed")), + "Update Failed")), ("rollback_in_progress", pgettext_lazy("current status of stack", - u"Rollback In Progress")), + "Rollback In Progress")), ("rollback_complete", pgettext_lazy("current status of stack", - u"Rollback Complete")), + "Rollback Complete")), ("rollback_failed", pgettext_lazy("current status of stack", - u"Rollback Failed")), + "Rollback Failed")), ("suspend_in_progress", pgettext_lazy("current status of stack", - u"Suspend In Progress")), + "Suspend In Progress")), ("suspend_complete", pgettext_lazy("current status of stack", - u"Suspend Complete")), + "Suspend Complete")), ("suspend_failed", pgettext_lazy("current status of stack", - u"Suspend Failed")), + "Suspend Failed")), ("resume_in_progress", pgettext_lazy("current status of stack", - u"Resume In Progress")), + "Resume In Progress")), ("resume_complete", pgettext_lazy("current status of stack", - u"Resume Complete")), + "Resume Complete")), ("resume_failed", pgettext_lazy("current status of stack", - u"Resume Failed")), + "Resume Failed")), ("adopt_in_progress", pgettext_lazy("current status of stack", - u"Adopt In Progress")), + "Adopt In Progress")), ("adopt_complete", pgettext_lazy("current status of stack", - u"Adopt Complete")), + "Adopt Complete")), ("adopt_failed", pgettext_lazy("current status of stack", - u"Adopt Failed")), + "Adopt Failed")), ("snapshot_in_progress", pgettext_lazy("current status of stack", - u"Snapshot In Progress")), + "Snapshot In Progress")), ("snapshot_complete", pgettext_lazy("current status of stack", - u"Snapshot Complete")), + "Snapshot Complete")), ("snapshot_failed", pgettext_lazy("current status of stack", - u"Snapshot Failed")), + "Snapshot Failed")), ("check_in_progress", pgettext_lazy("current status of stack", - u"Check In Progress")), + "Check In Progress")), ("check_complete", pgettext_lazy("current status of stack", - u"Check Complete")), + "Check Complete")), ("check_failed", pgettext_lazy("current status of stack", - u"Check Failed")), + "Check Failed")), ) name = tables.Column("name", link="horizon:nfv:vnfmanager:detail",