mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-18 17:41:12 +00:00
![]() ## Summary Given: ```python # -*- coding: utf-8 -*- import random # Defaults for arguments are defined here # args.threshold = None; logger = logging.getLogger("FastProject") ``` We want to count the number of newlines after `import random`, to ensure that there's _at least one_, but up to two. Previously, we used the end range of the statement (then skipped trivia); instead, we need to use the end of the _last comment_. This is similar to #7556. Closes https://github.com/astral-sh/ruff/issues/7604. |
||
---|---|---|
.. | ||
fixtures |