Skip to content

Commit

Permalink
Switch to ruff from black
Browse files Browse the repository at this point in the history
  • Loading branch information
cgokmen committed Dec 27, 2024
1 parent dbdd9d0 commit 41b945f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 28 deletions.
16 changes: 7 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
repos:
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.3.0
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.8.4
hooks:
- id: black
language_version: python3.10
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
name: isort (python)
# Run the linter.
- id: ruff
# Run the formatter.
- id: ruff-format
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
Expand Down
20 changes: 1 addition & 19 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
[tool.black]
line-length = 120
target-version = ['py310']
force-exclude = 'omnigibson/(data|external)'

[tool.isort]
profile = "black"
line_length = 120
py_version = '310'
filter_files = true
extend_skip_glob = [
'omnigibson/data/*',
'omnigibson/external/*'
]

[tool.pyright]
exclude = [
'omnigibson/data',
Expand All @@ -25,12 +10,9 @@ testpaths = [
"tests",
]

[tool.coverage.run]
omit = ["omnigibson/external/*"]

[tool.ruff]
# Exclude a variety of commonly ignored directories.
extend-exclude = ["omnigibson/utils/pynvml_utils.py"]
extend-exclude = ["omnigibson/utils/pynvml_utils.py", "omnigibson/data"]

# Same as Black.
line-length = 120
Expand Down

0 comments on commit 41b945f

Please sign in to comment.