Skip to content

Commit 76884ef

Browse files
committed
Remove unicode prefix from code
All strings are considered as unicode string from Python 3. This patch drops the explicit unicode literal (u'...') appearances from the unicode strings. Change-Id: I6d58ff205118ba60c94f88625d82f976079a6020
1 parent 7f6d368 commit 76884ef

File tree

10 files changed

+38
-46
lines changed

10 files changed

+38
-46
lines changed

cloudkittydashboard/api/cloudkitty.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
# Copyright 2015 Objectif Libre
32
#
43
# Licensed under the Apache License, Version 2.0 (the "License"); you may

cloudkittydashboard/dashboards/admin/hashmap/tables.py

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,16 @@ class DeleteService(tables.DeleteAction):
4141
@staticmethod
4242
def action_present(count):
4343
return ngettext_lazy(
44-
u"Delete Service",
45-
u"Delete Services",
44+
"Delete Service",
45+
"Delete Services",
4646
count
4747
)
4848

4949
@staticmethod
5050
def action_past(count):
5151
return ngettext_lazy(
52-
u"Deleted Service",
53-
u"Deleted Services",
52+
"Deleted Service",
53+
"Deleted Services",
5454
count
5555
)
5656

@@ -103,16 +103,16 @@ class DeleteGroup(tables.DeleteAction):
103103
@staticmethod
104104
def action_present(count):
105105
return ngettext_lazy(
106-
u"Delete Group",
107-
u"Delete Groups",
106+
"Delete Group",
107+
"Delete Groups",
108108
count
109109
)
110110

111111
@staticmethod
112112
def action_past(count):
113113
return ngettext_lazy(
114-
u"Deleted Group",
115-
u"Deleted Groups",
114+
"Deleted Group",
115+
"Deleted Groups",
116116
count
117117
)
118118

@@ -190,16 +190,16 @@ class DeleteServiceThreshold(tables.DeleteAction):
190190
@staticmethod
191191
def action_present(count):
192192
return ngettext_lazy(
193-
u"Delete Service Threshold",
194-
u"Delete Service Thresholds",
193+
"Delete Service Threshold",
194+
"Delete Service Thresholds",
195195
count
196196
)
197197

198198
@staticmethod
199199
def action_past(count):
200200
return ngettext_lazy(
201-
u"Deleted Service Threshold",
202-
u"Deleted Service Thresholds",
201+
"Deleted Service Threshold",
202+
"Deleted Service Thresholds",
203203
count
204204
)
205205

@@ -217,16 +217,16 @@ class DeleteFieldThreshold(tables.DeleteAction):
217217
@staticmethod
218218
def action_present(count):
219219
return ngettext_lazy(
220-
u"Delete Field Threshold",
221-
u"Delete Field Thresholds",
220+
"Delete Field Threshold",
221+
"Delete Field Thresholds",
222222
count
223223
)
224224

225225
@staticmethod
226226
def action_past(count):
227227
return ngettext_lazy(
228-
u"Deleted Field Threshold",
229-
u"Deleted Field Thresholds",
228+
"Deleted Field Threshold",
229+
"Deleted Field Thresholds",
230230
count
231231
)
232232

@@ -357,16 +357,16 @@ class DeleteField(tables.DeleteAction):
357357
@staticmethod
358358
def action_present(count):
359359
return ngettext_lazy(
360-
u"Delete Field",
361-
u"Delete Fields",
360+
"Delete Field",
361+
"Delete Fields",
362362
count
363363
)
364364

365365
@staticmethod
366366
def action_past(count):
367367
return ngettext_lazy(
368-
u"Deleted Field",
369-
u"Deleted Fields",
368+
"Deleted Field",
369+
"Deleted Fields",
370370
count
371371
)
372372

@@ -429,16 +429,16 @@ class DeleteMapping(tables.DeleteAction):
429429
@staticmethod
430430
def action_present(count):
431431
return ngettext_lazy(
432-
u"Delete Mapping",
433-
u"Delete Mappings",
432+
"Delete Mapping",
433+
"Delete Mappings",
434434
count
435435
)
436436

437437
@staticmethod
438438
def action_past(count):
439439
return ngettext_lazy(
440-
u"Deleted Mapping",
441-
u"Deleted Mappings",
440+
"Deleted Mapping",
441+
"Deleted Mappings",
442442
count
443443
)
444444

cloudkittydashboard/dashboards/admin/modules/tables.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ class ToggleEnabledModule(tables.BatchAction):
4747
def action_present(count):
4848
return (
4949
ngettext_lazy(
50-
u"Enable Module",
51-
u"Enable Modules",
50+
"Enable Module",
51+
"Enable Modules",
5252
count
5353
),
5454
ngettext_lazy(
55-
u"Disable Module",
56-
u"Disable Modules",
55+
"Disable Module",
56+
"Disable Modules",
5757
count
5858
),
5959
)
@@ -62,13 +62,13 @@ def action_present(count):
6262
def action_past(count):
6363
return (
6464
ngettext_lazy(
65-
u"Enabled Module",
66-
u"Enabled Modules",
65+
"Enabled Module",
66+
"Enabled Modules",
6767
count
6868
),
6969
ngettext_lazy(
70-
u"Disabled Module",
71-
u"Disabled Modules",
70+
"Disabled Module",
71+
"Disabled Modules",
7272
count
7373
),
7474
)

cloudkittydashboard/dashboards/admin/pyscripts/tables.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,16 @@ class DeletePyScript(tables.DeleteAction):
5656
@staticmethod
5757
def action_present(count):
5858
return ngettext_lazy(
59-
u"Delete PyScript",
60-
u"Delete PyScripts",
59+
"Delete PyScript",
60+
"Delete PyScripts",
6161
count
6262
)
6363

6464
@staticmethod
6565
def action_past(count):
6666
return ngettext_lazy(
67-
u"Deleted PyScript",
68-
u"Deleted PyScripts",
67+
"Deleted PyScript",
68+
"Deleted PyScripts",
6969
count
7070
)
7171

cloudkittydashboard/tests/base.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# -*- coding: utf-8 -*-
2-
31
# Copyright 2010-2011 OpenStack Foundation
42
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
53
#

cloudkittydashboard/tests/test_cloudkittydashboard.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
# -*- coding: utf-8 -*-
21
# Copyright 2015 Objectif Libre
3-
2+
#
43
# Licensed under the Apache License, Version 2.0 (the "License"); you may
54
# not use this file except in compliance with the License. You may obtain
65
# a copy of the License at

cloudkittydashboard/utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
# Copyright 2018 Objectif Libre
32
#
43
# Licensed under the Apache License, Version 2.0 (the "License"); you may

doc/source/conf.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
# Licensed under the Apache License, Version 2.0 (the "License");
32
# you may not use this file except in compliance with the License.
43
# You may obtain a copy of the License at

doc/source/installation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,5 @@ Some symbols (Such as Non-ASCII) might require to use unicode value directly.
7272
.. code-block:: python
7373
7474
# British Pound
75-
OPENSTACK_CLOUDKITTY_RATE_PREFIX = u'\xA3'
75+
OPENSTACK_CLOUDKITTY_RATE_PREFIX = '\xA3'
7676
OPENSTACK_CLOUDKITTY_RATE_POSTFIX = 'GBP'

releasenotes/source/conf.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# -*- coding: utf-8 -*-
2-
#
31
# Cloudkitty Release Notes documentation build configuration file.
42
#
53
# This file is execfile()d with the current directory set to its

0 commit comments

Comments
 (0)