mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-03 18:28:24 +00:00
Fix the input for black's line ranges test file (#9622)
This commit is contained in:
parent
47b8a897e7
commit
395bf3dc98
19 changed files with 49 additions and 106 deletions
|
@ -1,3 +1,4 @@
|
|||
# flags: --line-ranges=5-6
|
||||
# NOTE: If you need to modify this file, pay special attention to the --line-ranges=
|
||||
# flag above as it's formatting specifically these lines.
|
||||
def foo1(parameter_1, parameter_2, parameter_3, parameter_4, parameter_5, parameter_6, parameter_7): pass
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# flags: --line-ranges=10-11
|
||||
# NOTE: If you need to modify this file, pay special attention to the --line-ranges=
|
||||
# flag above as it's formatting specifically these lines.
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# flags: --line-ranges=7-7 --line-ranges=17-23
|
||||
# NOTE: If you need to modify this file, pay special attention to the --line-ranges=
|
||||
# flag above as it's formatting specifically these lines.
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# flags: --line-ranges=12-12 --line-ranges=21-21
|
||||
# NOTE: If you need to modify this file, pay special attention to the --line-ranges=
|
||||
# flag above as it's formatting specifically these lines.
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# flags: --line-ranges=11-17
|
||||
# NOTE: If you need to modify this file, pay special attention to the --line-ranges=
|
||||
# flag above as it's formatting specifically these lines.
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# flags: --line-ranges=8-8
|
||||
# NOTE: If you need to modify this file, pay special attention to the --line-ranges=
|
||||
# flag above as it's formatting specifically these lines.
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# flags: --line-ranges=8-8
|
||||
# NOTE: If you need to modify this file, pay special attention to the --line-ranges=
|
||||
# flag above as it's formatting specifically these lines.
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# flags: --line-ranges=5-5
|
||||
# NOTE: If you need to modify this file, pay special attention to the --line-ranges=
|
||||
# flag above as it's formatting specifically these lines.
|
||||
if cond1:
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# flags: --line-ranges=9-11
|
||||
# NOTE: If you need to modify this file, pay special attention to the --line-ranges=
|
||||
# flag above as it's formatting specifically these lines.
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# flags: --line-ranges=5-5 --line-ranges=9-9 --line-ranges=13-13
|
||||
# NOTE: If you need to modify this file, pay special attention to the --line-ranges=
|
||||
# flag above as it's formatting specifically these lines.
|
||||
alist = [
|
||||
|
|
|
@ -45,6 +45,10 @@ def import_fixture(fixture: Path, fixture_set: str):
|
|||
if "--pyi" in flags:
|
||||
extension = "pyi"
|
||||
|
||||
if "--line-ranges=" in flags:
|
||||
# Black preserves the flags for line-ranges tests to not mess up the line numbers
|
||||
input.insert(0, flags)
|
||||
|
||||
if "--line-length=" in flags:
|
||||
[_, length_and_rest] = flags.split("--line-length=", 1)
|
||||
length = length_and_rest.split(" ", 1)[0]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue