Limit isort.lines-after-imports to 1 for stub files (#9971)

This commit is contained in:
Micha Reiser 2024-02-28 17:36:51 +01:00 committed by GitHub
parent 317d2e4c75
commit 1791e7d73b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 228 additions and 2 deletions

View file

@ -2049,6 +2049,9 @@ pub struct IsortOptions {
/// The number of blank lines to place after imports.
/// Use `-1` for automatic determination.
///
/// Ruff uses at most one blank line after imports in typing stub files (files with `.pyi` extension) in accordance to
/// the typing style recommendations ([source](https://typing.readthedocs.io/en/latest/source/stubs.html#blank-lines)).
///
/// When using the formatter, only the values `-1`, `1`, and `2` are compatible because
/// it enforces at least one empty and at most two empty lines after imports.
#[option(