mirror of
https://github.com/wassname/peft.git
synced 2026-09-09 11:28:32 +08:00
style: switch to ruff
This commit is contained in:
+16
-11
@@ -2,14 +2,12 @@
|
||||
line-length = 119
|
||||
target-version = ['py36']
|
||||
|
||||
[tool.isort]
|
||||
line_length = 119
|
||||
multi_line_output = 3
|
||||
include_trailing_comma = true
|
||||
force_grid_wrap = 0
|
||||
use_parentheses = true
|
||||
ensure_newline_before_comments = true
|
||||
lines_after_imports = 2
|
||||
[tool.ruff]
|
||||
ignore = ["C901", "E501", "E741", "W605"]
|
||||
select = ["C", "E", "F", "I", "W"]
|
||||
line-length = 119
|
||||
|
||||
[tool.ruff.isort]
|
||||
default_section = "FIRSTPARTY"
|
||||
known_first_party = "pet"
|
||||
known_third_party = [
|
||||
@@ -18,10 +16,17 @@ known_third_party = [
|
||||
"accelerate",
|
||||
"transformers",
|
||||
]
|
||||
line_length = 119
|
||||
lines_after_imports = 2
|
||||
multi_line_output = 3
|
||||
include_trailing_comma = true
|
||||
force_grid_wrap = 0
|
||||
use_parentheses = true
|
||||
ensure_newline_before_comments = true
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
[tool.pytest]
|
||||
doctest_optionflags = [
|
||||
"NUMBER",
|
||||
"NORMALIZE_WHITESPACE",
|
||||
"ELLIPSIS",
|
||||
]
|
||||
"NUMBER",
|
||||
]
|
||||
@@ -14,9 +14,8 @@
|
||||
|
||||
from setuptools import find_packages, setup
|
||||
|
||||
|
||||
extras = {}
|
||||
extras["quality"] = ["black ~= 22.0", "isort >= 5.5.4", "flake8 >= 3.8.3"]
|
||||
extras["quality"] = ["black ~= 22.0", "ruff>=0.0.241"]
|
||||
extras["docs_specific"] = ["hf-doc-builder"]
|
||||
extras["dev"] = extras["quality"] + extras["docs_specific"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user