1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

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.
This commit is contained in:
django-bot
2025-07-22 20:41:41 -07:00
committed by nessita
parent 55b0cc2131
commit 69a93a88ed
378 changed files with 2781 additions and 1861 deletions

View File

@@ -117,7 +117,8 @@ resolve_test_data = (
(),
{"arg2": "37"},
),
# Unnamed views should have None as the url_name. Regression data for #21157.
# Unnamed views should have None as the url_name. Regression data for
# #21157.
(
"/unnamed/normal/42/37/",
None,
@@ -445,7 +446,8 @@ class URLPatternReverse(SimpleTestCase):
self.assertEqual(got, expected)
def test_reverse_none(self):
# Reversing None should raise an error, not return the last un-named view.
# Reversing None should raise an error, not return the last un-named
# view.
with self.assertRaises(NoReverseMatch):
reverse(None)
@@ -661,7 +663,8 @@ class ResolverTests(SimpleTestCase):
("name-conflict", (), {"first": "arg"}, "conflict-first/arg/"),
("name-conflict", (), {"middle": "arg"}, "conflict-middle/arg/"),
("name-conflict", (), {"last": "arg"}, "conflict-last/arg/"),
# The number and order of the arguments don't interfere with reversing.
# The number and order of the arguments don't interfere with
# reversing.
("name-conflict", ("arg", "arg"), {}, "conflict/arg/arg/"),
]
for name, args, kwargs, expected in test_urls:
@@ -851,8 +854,9 @@ class ReverseShortcutTests(SimpleTestCase):
# Assert that we can redirect using UTF-8 strings
res = redirect("/æøå/abc/")
self.assertEqual(res.url, "/%C3%A6%C3%B8%C3%A5/abc/")
# Assert that no imports are attempted when dealing with a relative path
# (previously, the below would resolve in a UnicodeEncodeError from __import__ )
# Assert that no imports are attempted when dealing with a relative
# path (previously, the below would resolve in a UnicodeEncodeError
# from __import__ )
res = redirect("/æøå.abc/")
self.assertEqual(res.url, "/%C3%A6%C3%B8%C3%A5.abc/")
res = redirect("os.path")