Skip to content

Commit 3f9df91

Browse files
committed
use ruff for import sorts
1 parent 993d946 commit 3f9df91

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

.github/workflows/linting.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,13 @@ jobs:
2323
- name: Install formatting dependencies
2424
run: |
2525
python -m pip install --upgrade pip
26-
pip install black isort ruff
26+
pip install black ruff
2727
2828
- name: Check Black formatting
2929
run: |
3030
echo "Checking Black formatting..."
3131
black --check --diff stagehand
3232
33-
- name: Check import sorting
34-
run: |
35-
echo "Checking import sorting..."
36-
isort --check-only --diff stagehand
37-
3833
- name: Run Ruff linting
3934
run: |
4035
echo "Running Ruff linting..."

format.sh

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,12 @@
33
# Define source directories (adjust as needed)
44
SOURCE_DIRS="stagehand"
55

6-
# Apply Black formatting only to source directories
6+
# Apply Black formatting first
77
echo "Applying Black formatting..."
88
black $SOURCE_DIRS
99

10-
# Fix import sorting (addresses I001 errors)
11-
echo "Sorting imports..."
12-
isort $SOURCE_DIRS
13-
14-
# Apply Ruff with autofix for remaining issues
15-
echo "Applying Ruff autofixes..."
10+
# Apply Ruff with autofix for all issues (including import sorting)
11+
echo "Applying Ruff autofixes (including import sorting)..."
1612
ruff check --fix $SOURCE_DIRS
1713

1814
echo "Checking for remaining issues..."

0 commit comments

Comments
 (0)