Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v2.7.5 #73

Merged
merged 2 commits into from
Sep 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion pyclean/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ def parse_arguments():
nargs='*', default=argparse.SUPPRESS, choices=debris_choices,
help='remove leftovers from popular Python development '
'tools (may be specified multiple times; '
'default: %s)' % ' '.join(debris_default_topics))
'optional: all %s; default: %s)' % (
' '.join(debris_optional_topics),
' '.join(debris_default_topics),
),
)
parser.add_argument('-e', '--erase', metavar='PATTERN', action='extend',
nargs='+', default=[],
help='delete files or folders matching a globbing '
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "pyclean"
version = "2.7.4"
version = "2.7.5"
description = "Pure Python cross-platform pyclean. Clean up your Python bytecode."
readme = "README.rst"
license = {file = "LICENSE"}
Expand Down
17 changes: 17 additions & 0 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"""
import os
import platform
import re
import sys
from importlib import import_module

Expand Down Expand Up @@ -179,6 +180,22 @@ def test_debris_default_args():
assert args.debris == ['cache', 'coverage', 'package', 'pytest']


def test_debris_optional_args():
"""
Does the help screen explain all --debris options?
"""
expected_debris_options_help = (
'(may be specified multiple times; '
'optional: all jupyter mypy ruff tox; '
'default: cache coverage package pytest)'
)

result = shell('pyclean --help')
normalized_stdout = re.sub(f'{os.linesep} *', ' ', result.stdout)

assert expected_debris_options_help in normalized_stdout


def test_debris_all():
"""
Does calling `pyclean --debris all` pick all topics?
Expand Down