isort-psycopg

isort plug-in to sort imports by module length first

2 个版本
安装
pip install isort-psycopg
poetry add isort-psycopg
pipenv install isort-psycopg
conda install isort-psycopg
描述

Psycopg style isort

This is an isort_ plugin implementing the style used in the Psycopg 3_ project to sort:

  • imports in length order
  • import lists in natural order

The effect is the same of specifying --length-sort but only for the module names. For example::

from ccc import aaaa, bbb, cc
from bbbb import ddd, ee
from aaaaa import fff, gg

Example configuration::

[tool.isort]
profile = "black"
length_sort = true
multi_line_output = 9
sort_order = "psycopg"

Note: because this is the first day I use isort at all, there is a chance that this plug-in is totally useless and the same can be done using isort features.

.. _isort: https://pycqa.github.io/isort/ .. _psycopg 3: https://www.psycopg.org/

版本列表
0.0.2 2025-02-13
0.0.1 2025-02-13