Skip to content

Commit 0fcccff

Browse files
committed
Begin switching e.g. html/javascript template strings with embedded escapes in
them to raw strings in order to avoid DeprecationWarning (on python3.6+) or SyntaxError (python3.12+).
1 parent 8e7c396 commit 0fcccff

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

mig/shared/accountreq.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def account_js_helpers(configuration, fields):
7878
<script type="text/javascript" src="/images/js/jquery.form.js"></script>
7979
<script type="text/javascript" src="/images/js/jquery.accountform.js"></script>
8080
'''
81-
add_init = """
81+
add_init = r"""
8282
/* Helper to define countries for which State field makes sense */
8383
var enable_state = ['US', 'CA', 'AU'];
8484
var peers_mandatory = %(peers_mandatory)s;
@@ -527,7 +527,7 @@ def account_request_template(configuration, password=True, default_values={}):
527527
comment_pattern = ''
528528

529529
if 'full_name' in configuration.site_peers_explicit_fields:
530-
html += """
530+
html += r"""
531531
<div class='form-row single-entry %(show_peers_full_name)s'>
532532
<div class='col-md-12 mb-3 form-cell'>
533533
<!-- NOTE: this simple form control just looks for one or more full names.
@@ -544,7 +544,7 @@ def account_request_template(configuration, password=True, default_values={}):
544544
</div>
545545
"""
546546
if 'email' in configuration.site_peers_explicit_fields:
547-
html += """
547+
html += r"""
548548
<div class='form-row single-entry %(show_peers_email)s'>
549549
<div class='col-md-12 mb-3 form-cell'>
550550
<!-- NOTE: this simple form control just looks for one or more emails.

0 commit comments

Comments
 (0)