Skip to content

Commit 4323a68

Browse files
committed
ci: pass explicit config to black/isort so root dev/ does not break discovery
When ../dev is included, black/isort resolve their config from the common parent of all paths (the repo root, which has no pyproject.toml) and fall back to defaults. Pass --config/--settings-path explicitly.
1 parent d74cec5 commit 4323a68

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎.github/workflows/python-ci.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ jobs:
5757
- name: Code style
5858
working-directory: ./python
5959
run: |
60-
poetry run python -m black --check graphframes dev ../dev
60+
poetry run python -m black --check --config pyproject.toml graphframes dev ../dev
6161
poetry run python -m flake8 graphframes dev ../dev
62-
poetry run python -m isort --check graphframes dev ../dev
62+
poetry run python -m isort --check --settings-path pyproject.toml graphframes dev ../dev
6363
- name: Build jar
6464
working-directory: ./python
6565
run: |

‎.pre-commit-config.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ repos:
33
hooks:
44
- id: black
55
name: black
6-
entry: bash -c 'cd python && poetry run black graphframes/ dev/ ../dev/' --
6+
entry: bash -c 'cd python && poetry run black --config pyproject.toml graphframes/ dev/ ../dev/' --
77
language: system
88
types: [python]
99

@@ -15,7 +15,7 @@ repos:
1515

1616
- id: isort
1717
name: isort
18-
entry: bash -c 'cd python && poetry run isort graphframes/ dev/ ../dev/' --
18+
entry: bash -c 'cd python && poetry run isort --settings-path pyproject.toml graphframes/ dev/ ../dev/' --
1919
language: system
2020
types: [python]
2121

0 commit comments

Comments
 (0)