diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d19d93fb6..a4f472c5e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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: diff --git a/pyproject.toml b/pyproject.toml index 1b73fe96c..709cc9b7c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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', @@ -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