diff options
| author | django-bot <ops@djangoproject.com> | 2025-07-22 20:41:41 -0700 |
|---|---|---|
| committer | nessita <124304+nessita@users.noreply.github.com> | 2025-07-23 20:17:55 -0300 |
| commit | 69a93a88edb56ba47f624dac7a21aacc47ea474f (patch) | |
| tree | f57507a4435d032493cae40e06ecb254790b67b2 /django/utils/html.py | |
| parent | 55b0cc21310b76ce4018dd793ba50556eaf0af06 (diff) | |
Refs #36500 -- Rewrapped long docstrings and block comments via a script.
Rewrapped long docstrings and block comments to 79 characters + newline
using script from https://github.com/medmunds/autofix-w505.
Diffstat (limited to 'django/utils/html.py')
| -rw-r--r-- | django/utils/html.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/django/utils/html.py b/django/utils/html.py index 56435eb7e2..d3b904a822 100644 --- a/django/utils/html.py +++ b/django/utils/html.py @@ -256,8 +256,8 @@ def smart_urlquote(url): netloc = unquote_quote(netloc) if query: - # Separately unquoting key/value, so as to not mix querystring separators - # included in query values. See #22267. + # Separately unquoting key/value, so as to not mix querystring + # separators included in query values. See #22267. query_parts = [ (unquote(q[0]), unquote(q[1])) for q in parse_qsl(query, keep_blank_values=True) @@ -352,7 +352,8 @@ class Urlizer: url = smart_urlquote(html.unescape(middle)) elif len(middle) <= MAX_URL_LENGTH and self.simple_url_2_re.match(middle): unescaped_middle = html.unescape(middle) - # RemovedInDjango70Warning: When the deprecation ends, replace with: + # RemovedInDjango70Warning: When the deprecation ends, replace + # with: # url = smart_urlquote(f"https://{unescaped_middle}") protocol = ( "https" @@ -462,7 +463,8 @@ class Urlizer: trail_start = len(rstripped) amount_trailing_semicolons = len(middle) - len(middle.rstrip(";")) if amp > -1 and amount_trailing_semicolons > 1: - # Leave up to most recent semicolon as might be an entity. + # Leave up to most recent semicolon as might be an + # entity. recent_semicolon = middle[trail_start:].index(";") middle_semicolon_index = recent_semicolon + trail_start + 1 trail = middle[middle_semicolon_index:] + trail |
