python: run isort on everything
authorSimon Marchi <simon.marchi@efficios.com>
Tue, 19 Sep 2023 18:45:05 +0000 (14:45 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 21 Sep 2023 17:29:44 +0000 (13:29 -0400)
Run isort on the whole repo, to nicely sort Python imports.

Add a mention in CONTRIBUTING.adoc, that all Python imports must be
sorted using the version of isort specified in dev-requirements.txt.

Add `isort ~= 5.12` to dev-requirements.txt.  5.12 is the latest stable
version available on PyPi as of writing.

Tell isort to use its `black` profile, in pyproject.toml, so that
black remains happy.  The details of that profile are here:

  https://pycqa.github.io/isort/docs/configuration/profiles.html

Tell isort to ignore `tests/utils/python/tap`, since it's code copied
from elsewhere.

Use the `length_sort` option, because Philippe prefers it like that.
See:

  https://pycqa.github.io/isort/docs/configuration/custom_sections_and_ordering.html

Change-Id: I8778f908342d0feeb97d4442506113d9252559e7
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/10871
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>

No differences found
This page took 0.025689 seconds and 4 git commands to generate.