Skip to content

Commit

Permalink
dx(backend): Fix pre-commit isort step (#8726)
Browse files Browse the repository at this point in the history
- Set `tool.isort.profile = "black"`
- Explicitly pass the first-party package name in the `isort` jobs in the `pre-commit` config
  • Loading branch information
Pwuts authored Nov 20, 2024
1 parent a5734a5 commit 33dd2eb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,31 +105,31 @@ repos:
- id: isort
name: Lint (isort) - AutoGPT Platform - Backend
alias: isort-platform-backend
entry: poetry -C autogpt_platform/backend run isort
entry: poetry -C autogpt_platform/backend run isort -p backend
files: ^autogpt_platform/backend/
types: [file, python]
language: system

- id: isort
name: Lint (isort) - Classic - AutoGPT
alias: isort-classic-autogpt
entry: poetry -C classic/original_autogpt run isort
entry: poetry -C classic/original_autogpt run isort -p autogpt
files: ^classic/original_autogpt/
types: [file, python]
language: system

- id: isort
name: Lint (isort) - Classic - Forge
alias: isort-classic-forge
entry: poetry -C classic/forge run isort
entry: poetry -C classic/forge run isort -p forge
files: ^classic/forge/
types: [file, python]
language: system

- id: isort
name: Lint (isort) - Classic - Benchmark
alias: isort-classic-benchmark
entry: poetry -C classic/benchmark run isort
entry: poetry -C classic/benchmark run isort -p agbenchmark
files: ^classic/benchmark/
types: [file, python]
language: system
Expand Down
3 changes: 3 additions & 0 deletions autogpt_platform/backend/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ format = "linter:format"
lint = "linter:lint"
test = "run_tests:test"

[tool.isort]
profile = "black"

[tool.pytest-watcher]
now = false
clear = true
Expand Down

0 comments on commit 33dd2eb

Please sign in to comment.