mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-29 05:15:12 +00:00
Limit isort.lines-after-imports
to 1 for stub files (#9971)
This commit is contained in:
parent
317d2e4c75
commit
1791e7d73b
8 changed files with 228 additions and 2 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue