style: switch to ruff

This commit is contained in:
Saurav Maheshkar
2023-02-27 10:50:10 +00:00
parent 5c7fe97753
commit 99901896cc
2 changed files with 17 additions and 13 deletions
+16 -11
View File
@@ -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",
]
+1 -2
View File
@@ -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"]