Cautioned against multi-level relative imports in coding style docs.
Some checks are pending
Docs / spelling (push) Waiting to run
Docs / blacken-docs (push) Waiting to run
Docs / lint-docs (push) Waiting to run
Linters / flake8 (push) Waiting to run
Linters / isort (push) Waiting to run
Linters / black (push) Waiting to run
Tests / Windows, SQLite, Python 3.13 (push) Waiting to run
Tests / JavaScript tests (push) Waiting to run

This commit is contained in:
lyova24 2025-10-05 04:28:46 +07:00 committed by Jacob Walls
parent 54cfb5f328
commit a545eb0c1a

View file

@ -150,8 +150,9 @@ Imports
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.
section. Use absolute imports for other Django components and a one-dot
relative import (``from .foo import Bar``) for local components. Avoid
multi-dot relative imports.
* On each line, alphabetize the items with the upper case items grouped before
the lowercase items.