mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-31 07:37:38 +00:00
Add tab width option (#6848)
This commit is contained in:
parent
f91bacbb94
commit
9d77552e18
20 changed files with 345 additions and 44 deletions
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"tab_width": 8
|
||||
}
|
|
@ -2,14 +2,21 @@
|
|||
{
|
||||
"indent_style": {
|
||||
"Space": 4
|
||||
}
|
||||
},
|
||||
"tab_width": 8
|
||||
},
|
||||
{
|
||||
"indent_style": {
|
||||
"Space": 2
|
||||
}
|
||||
},
|
||||
"tab_width": 8
|
||||
},
|
||||
{
|
||||
"indent_style": "Tab"
|
||||
"indent_style": "Tab",
|
||||
"tab_width": 8
|
||||
},
|
||||
{
|
||||
"indent_style": "Tab",
|
||||
"tab_width": 4
|
||||
}
|
||||
]
|
||||
|
|
8
crates/ruff_python_formatter/resources/test/fixtures/ruff/tab_width.options.json
vendored
Normal file
8
crates/ruff_python_formatter/resources/test/fixtures/ruff/tab_width.options.json
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
[
|
||||
{
|
||||
"tab_width": 2
|
||||
},
|
||||
{
|
||||
"tab_width": 4
|
||||
}
|
||||
]
|
8
crates/ruff_python_formatter/resources/test/fixtures/ruff/tab_width.py
vendored
Normal file
8
crates/ruff_python_formatter/resources/test/fixtures/ruff/tab_width.py
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
# Fits with tab width 2
|
||||
1 + " 012345678901234567890123456789012345678901234567890123456789012345678901234567890"
|
||||
|
||||
# Fits with tab width 4
|
||||
1 + " 0123456789012345678901234567890123456789012345678901234567890123456789012345678"
|
||||
|
||||
# Fits with tab width 8
|
||||
1 + " 012345678901234567890123456789012345678901234567890123456789012345678901234"
|
Loading…
Add table
Add a link
Reference in a new issue