Skip to content

Commit

Permalink
lint: replace Black & C° with Ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
neithere committed Jun 16, 2024
1 parent 706e57d commit 3b3a320
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 23 deletions.
19 changes: 4 additions & 15 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,11 @@ repos:
- id: check-yaml
files: .*\.(yaml|yml)$

- repo: https://github.com/pycqa/isort
rev: 5.12.0
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.9
hooks:
- id: isort
name: isort

- repo: https://github.com/psf/black
rev: 23.9.1
hooks:
- id: black
language_version: python3

- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
hooks:
- id: flake8
- id: ruff
- id: ruff-format

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.5.1
Expand Down
12 changes: 4 additions & 8 deletions tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -742,8 +742,7 @@ def remind(
else:
assert "-t, --task TASK 'hang the Moose'" in help_normalised
assert (
"-r, --reason REASON 'there are creatures living in it'"
in help_normalised
"-r, --reason REASON 'there are creatures living in it'" in help_normalised
)

# explicit help message is not obscured by the implicit one
Expand Down Expand Up @@ -900,8 +899,7 @@ def second_func():
)
else:
arg_help_lines = (
" -h, --help show this help message and exit\n"
" -f, --foo FOO 123"
" -h, --help show this help message and exit\n" " -f, --foo FOO 123"
)

assert (
Expand Down Expand Up @@ -1041,8 +1039,7 @@ def second_func():
)
else:
arg_help_lines = (
" -h, --help show this help message and exit\n"
" -f, --foo FOO 123"
" -h, --help show this help message and exit\n" " -f, --foo FOO 123"
)

assert (
Expand Down Expand Up @@ -1135,8 +1132,7 @@ def second_func():
)
else:
arg_help_lines = (
" -h, --help show this help message and exit\n"
" -f, --foo FOO 123"
" -h, --help show this help message and exit\n" " -f, --foo FOO 123"
)

assert (
Expand Down

0 comments on commit 3b3a320

Please sign in to comment.