From 58b5270ed3d4eba90047604b80e839b7f39ce9ac Mon Sep 17 00:00:00 2001 From: Mike Fiedler Date: Sat, 16 Sep 2023 18:42:06 +0000 Subject: [PATCH] Remove ruff debris when specified Signed-off-by: Mike Fiedler --- pyclean/cli.py | 2 +- pyclean/modern.py | 4 ++++ tests/test_cli.py | 1 + tests/test_modern.py | 1 + 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/pyclean/cli.py b/pyclean/cli.py index 7e66d85..ecb974f 100644 --- a/pyclean/cli.py +++ b/pyclean/cli.py @@ -15,7 +15,7 @@ def parse_arguments(): Parse and handle CLI arguments """ debris_default_topics = ['cache', 'coverage', 'package', 'pytest'] - debris_optional_topics = ['jupyter', 'mypy', 'tox'] + debris_optional_topics = ['jupyter', 'mypy', 'ruff', 'tox'] debris_choices = ['all'] + debris_default_topics + debris_optional_topics ignore_default_items = [ '.git', diff --git a/pyclean/modern.py b/pyclean/modern.py index e99353e..6a878ca 100644 --- a/pyclean/modern.py +++ b/pyclean/modern.py @@ -50,6 +50,10 @@ '.pytest_cache/', 'pytestdebug.log', ], + 'ruff': [ + '.ruff_cache/**/*', + '.ruff_cache/', + ], 'tox': [ '.tox/**/*', '.tox/', diff --git a/tests/test_cli.py b/tests/test_cli.py index 067c1da..13192d6 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -193,6 +193,7 @@ def test_debris_all(): 'pytest', 'jupyter', 'mypy', + 'ruff', 'tox', ] diff --git a/tests/test_modern.py b/tests/test_modern.py index f88b7af..58b4c79 100644 --- a/tests/test_modern.py +++ b/tests/test_modern.py @@ -305,6 +305,7 @@ def test_erase_option(mock_descend, mock_debris, mock_erase): 'pytest', 'jupyter', 'mypy', + 'ruff', 'tox', ], )