Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/pip/python-packages-2955ab89d6
Browse files Browse the repository at this point in the history
  • Loading branch information
Balou9 authored Jul 24, 2024
2 parents 5339942 + f6c6d44 commit 2b1455d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion autohooks/plugins/ruff/ruff.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from autohooks.config import Config
from autohooks.precommit.run import ReportProgress

DEFAULT_ARGUMENTS = []
DEFAULT_ARGUMENTS = ["--output-format=concise"]


def check_ruff_installed() -> None:
Expand Down
3 changes: 3 additions & 0 deletions tests/test_ruff.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def test_get_ruff_config(
def test_get_default_ruff_arguments(self):
args = get_ruff_arguments(None)
self.assertEqual(args, DEFAULT_ARGUMENTS)
self.assertIsInstance(args, list, "ensures args is a list")

@patch("autohooks.plugins.ruff.ruff.get_ruff_config")
def test_get_ruff_arguments(
Expand All @@ -67,7 +68,9 @@ def test_get_ruff_arguments(
.get_config()
.get("tool", "autohooks", "plugins", "ruff")
)
self.assertIsInstance(args, list, "ensures args is a list")
self.assertEqual(args, ["--test", "foo,bar", "--foo", "bar"])

_get_ruff_config.assert_not_called()

@patch("autohooks.plugins.ruff.ruff.get_staged_status")
Expand Down

0 comments on commit 2b1455d

Please sign in to comment.