[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 12/47] qapi: enforce import order/styling with isort
From: |
Cleber Rosa |
Subject: |
Re: [PATCH v3 12/47] qapi: enforce import order/styling with isort |
Date: |
Tue, 29 Sep 2020 00:15:37 -0400 |
On Thu, Sep 24, 2020 at 08:28:25PM -0400, John Snow wrote:
> While we're mucking around with imports, we might as well formalize the
> style we use. Let's use isort to do it for us.
>
> force_sort_within_sections: Intermingles "from x" and "import x" style
> statements, such that sorting is always performed strictly on the module
> name itself.
>
> force_grid_wrap=4: Four or more imports from a single module will force
> the one-per-line style that's more git-friendly. This will generally
> happen for 'typing' imports.
>
> multi_line_output=3: Uses the one-per-line indented style for long
> imports.
>
> include_trailing_comma: Adds a comma to the last import in a group,
> which makes git conflicts nicer to deal with, generally.
>
> Suggested-by: Cleber Rosa <crosa@redhat.com>
> Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Tested-by: Cleber Rosa <crosa@redhat.com>
signature.asc
Description: PGP signature
- [PATCH v3 01/47] [DO-NOT-MERGE] docs: replace single backtick (`) with double-backtick (``), (continued)
Re: [PATCH v3 12/47] qapi: enforce import order/styling with isort,
Cleber Rosa <=
[PATCH v3 10/47] qapi: Prefer explicit relative imports, John Snow, 2020/09/24
[PATCH v3 13/47] qapi: delint using flake8, John Snow, 2020/09/24
[PATCH v3 05/47] qapi/doc.py: Change code templates from function to string, John Snow, 2020/09/24
[PATCH v3 15/47] qapi/common.py: Remove python compatibility workaround, John Snow, 2020/09/24
[PATCH v3 20/47] qapi/common.py: add type hint annotations, John Snow, 2020/09/24
[PATCH v3 17/47] qapi/common.py: delint with pylint, John Snow, 2020/09/24