Skip to content

Commit

Permalink
style: switch to ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
SauravMaheshkar committed Feb 27, 2023
1 parent 5c7fe97 commit 9990189
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
27 changes: 16 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand All @@ -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",
]
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down

0 comments on commit 9990189

Please sign in to comment.