mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 20:44:04 +00:00
zerver/views: Remove u prefix from strings.
This commit is contained in:
@@ -371,7 +371,7 @@ def finish_google_oauth2(request: HttpRequest) -> HttpResponse:
|
||||
full_name = body['name']['formatted']
|
||||
except KeyError:
|
||||
# Only google+ users have a formatted name. I am ignoring i18n here.
|
||||
full_name = u'{} {}'.format(
|
||||
full_name = '{} {}'.format(
|
||||
body['name']['givenName'], body['name']['familyName']
|
||||
)
|
||||
for email in body['emails']:
|
||||
|
||||
@@ -179,8 +179,8 @@ class NarrowBuilder:
|
||||
Escape user input to place in a regex
|
||||
|
||||
Python's re.escape escapes unicode characters in a way which postgres
|
||||
fails on, u'\u03bb' to u'\\\u03bb'. This function will correctly escape
|
||||
them for postgres, u'\u03bb' to u'\\u03bb'.
|
||||
fails on, '\u03bb' to '\\\u03bb'. This function will correctly escape
|
||||
them for postgres, '\u03bb' to '\\u03bb'.
|
||||
"""
|
||||
s = list(pattern)
|
||||
for i, c in enumerate(s):
|
||||
@@ -398,8 +398,8 @@ class NarrowBuilder:
|
||||
# whereas the offsets from tsearch_extras are in bytes, so we
|
||||
# have to account for both cases in the logic below.
|
||||
def highlight_string(text: Text, locs: Iterable[Tuple[int, int]]) -> Text:
|
||||
highlight_start = u'<span class="highlight">'
|
||||
highlight_stop = u'</span>'
|
||||
highlight_start = '<span class="highlight">'
|
||||
highlight_stop = '</span>'
|
||||
pos = 0
|
||||
result = ''
|
||||
in_tag = False
|
||||
|
||||
@@ -184,7 +184,7 @@ def accounts_register(request: HttpRequest) -> HttpResponse:
|
||||
default_stream_group_names = request.POST.getlist('default_stream_group')
|
||||
default_stream_groups = lookup_default_stream_groups(default_stream_group_names, realm)
|
||||
|
||||
timezone = u""
|
||||
timezone = ""
|
||||
if 'timezone' in request.POST and request.POST['timezone'] in get_all_timezones():
|
||||
timezone = request.POST['timezone']
|
||||
|
||||
|
||||
Reference in New Issue
Block a user