mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Refs #36485 -- Rewrapped docs to 79 columns line length.
Lines in the docs files were manually adjusted to conform to the 79 columns limit per line (plus newline), improving readability and consistency across the content.
This commit is contained in:
@@ -96,13 +96,12 @@ Python style
|
||||
|
||||
* In docstrings, follow the style of existing docstrings and :pep:`257`.
|
||||
|
||||
* In tests, use
|
||||
:meth:`~django.test.SimpleTestCase.assertRaisesMessage` and
|
||||
:meth:`~django.test.SimpleTestCase.assertWarnsMessage`
|
||||
instead of :meth:`~unittest.TestCase.assertRaises` and
|
||||
:meth:`~unittest.TestCase.assertWarns` so you can check the
|
||||
exception or warning message. Use :meth:`~unittest.TestCase.assertRaisesRegex`
|
||||
and :meth:`~unittest.TestCase.assertWarnsRegex` only if you need regular
|
||||
* In tests, use :meth:`~django.test.SimpleTestCase.assertRaisesMessage` and
|
||||
:meth:`~django.test.SimpleTestCase.assertWarnsMessage` instead of
|
||||
:meth:`~unittest.TestCase.assertRaises` and
|
||||
:meth:`~unittest.TestCase.assertWarns` so you can check the exception or
|
||||
warning message. Use :meth:`~unittest.TestCase.assertRaisesRegex` and
|
||||
:meth:`~unittest.TestCase.assertWarnsRegex` only if you need regular
|
||||
expression matching.
|
||||
|
||||
Use :meth:`assertIs(…, True/False)<unittest.TestCase.assertIs>` for testing
|
||||
@@ -149,9 +148,10 @@ Imports
|
||||
|
||||
* Put imports in these groups: future, standard library, third-party libraries,
|
||||
other Django components, local Django component, try/excepts. Sort lines in
|
||||
each group alphabetically by the full module name. Place all ``import module``
|
||||
statements before ``from module import objects`` in each section. Use absolute
|
||||
imports for other Django components and relative imports for local components.
|
||||
each group alphabetically by the full module name. Place all
|
||||
``import module`` statements before ``from module import objects`` in each
|
||||
section. Use absolute imports for other Django components and relative
|
||||
imports for local components.
|
||||
|
||||
* On each line, alphabetize the items with the upper case items grouped before
|
||||
the lowercase items.
|
||||
|
||||
Reference in New Issue
Block a user