Skip to content

Commit

Permalink
DX: switch to black pre-commit hook
Browse files Browse the repository at this point in the history
  • Loading branch information
redeboer committed Nov 7, 2023
1 parent 538fd5d commit 650517c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/repoma/check_dev_files/black.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def main(has_notebooks: bool) -> None:
executor = Executor()
executor(_remove_outdated_settings)
executor(_update_black_settings)
executor(remove_precommit_hook, "https://github.com/psf/black")

Check warning on line 33 in src/repoma/check_dev_files/black.py

View check run for this annotation

Codecov / codecov/patch

src/repoma/check_dev_files/black.py#L33

Added line #L33 was not covered by tests
executor(_update_precommit_repo, has_notebooks)
executor(add_extension_recommendation, "ms-python.black-formatter")
executor(set_setting, {"black-formatter.importStrategy": "fromEnvironment"})
Expand Down Expand Up @@ -81,7 +82,7 @@ def _update_black_settings() -> None:

def _update_precommit_repo(has_notebooks: bool) -> None:
expected_hook = CommentedMap(
repo="https://github.com/psf/black",
repo="https://github.com/psf/black-pre-commit-mirror",
hooks=[CommentedMap(id="black")],
)
if has_notebooks:
Expand Down

0 comments on commit 650517c

Please sign in to comment.