From aea6bbcbb0aeab349ae017e74bd63560cca1333b Mon Sep 17 00:00:00 2001 From: Jakob Guldberg Aaes Date: Mon, 5 Jan 2026 10:29:27 +0100 Subject: [PATCH 1/2] feat: add complexipy debris topic --- README.rst | 1 + pyclean/cli.py | 2 +- pyclean/debris.py | 4 ++++ tests/test_cli.py | 3 ++- tests/test_debris.py | 6 ++++-- 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index 75c60e6..0f160c2 100644 --- a/README.rst +++ b/README.rst @@ -201,6 +201,7 @@ Python bytecode. The following topics are currently covered: - Packaging (build files and folders) - Pytest (build files and folders) - Ruff (ruff cache folder) +- Complexipy (complexity analysis of python code) – *optional* - Jupyter (notebook checkpoints) – *optional* - Mypy (mypy cache folder) – *optional* - Pyright (pyright app cache folder) – *optional* diff --git a/pyclean/cli.py b/pyclean/cli.py index 206a5fe..954daee 100644 --- a/pyclean/cli.py +++ b/pyclean/cli.py @@ -19,7 +19,7 @@ def parse_arguments(): Parse and handle CLI arguments. """ debris_default_topics = ['cache', 'coverage', 'package', 'pytest', 'ruff'] - debris_optional_topics = ['jupyter', 'mypy', 'pyright', 'tox'] + debris_optional_topics = ['complexipy', 'jupyter', 'mypy', 'pyright', 'tox'] debris_choices = ['all', *debris_default_topics, *debris_optional_topics] ignore_default_items = [ '.git', diff --git a/pyclean/debris.py b/pyclean/debris.py index 413d6c5..5759eb6 100644 --- a/pyclean/debris.py +++ b/pyclean/debris.py @@ -19,6 +19,10 @@ '.cache/**/*', '.cache/', ], + 'complexipy': [ + '.complexipy_cache/**/*', + '.complexipy_cache/', + ], 'coverage': [ '.coverage', 'coverage.json', diff --git a/tests/test_cli.py b/tests/test_cli.py index af303f7..b6c39fa 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -121,7 +121,7 @@ def test_debris_optional_args(): """ expected_debris_options_help = ( '(may be specified multiple times; ' - 'optional: all jupyter mypy pyright tox; ' + 'optional: all complexipy jupyter mypy pyright tox; ' 'default: cache coverage package pytest ruff)' ) @@ -144,6 +144,7 @@ def test_debris_all(): 'package', 'pytest', 'ruff', + 'complexipy', 'jupyter', 'mypy', 'pyright', diff --git a/tests/test_debris.py b/tests/test_debris.py index 0840cd3..9309891 100644 --- a/tests/test_debris.py +++ b/tests/test_debris.py @@ -53,11 +53,13 @@ def test_debris_option(mock_descend, mock_debris, mock_erase, options, scanned_t 'debris_topic', [ 'cache', + 'complexipy', 'coverage', - 'package', - 'pytest', 'jupyter', 'mypy', + 'package', + 'pyright', + 'pytest', 'ruff', 'tox', ], From c71c8ec066cf756b5f1acf18151ddc85206b40f1 Mon Sep 17 00:00:00 2001 From: Jakob Stender Gulberg Date: Fri, 9 Jan 2026 11:36:56 +0100 Subject: [PATCH 2/2] Update README.rst Co-authored-by: Peter Bittner --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 0f160c2..7446240 100644 --- a/README.rst +++ b/README.rst @@ -201,7 +201,7 @@ Python bytecode. The following topics are currently covered: - Packaging (build files and folders) - Pytest (build files and folders) - Ruff (ruff cache folder) -- Complexipy (complexity analysis of python code) – *optional* +- Complexipy (complexity analysis of Python code) – *optional* - Jupyter (notebook checkpoints) – *optional* - Mypy (mypy cache folder) – *optional* - Pyright (pyright app cache folder) – *optional*