Skip to content

Fix usage of (s) instead of correct plural and singular in collection logs. #50

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

Merged
merged 2 commits into from
Dec 22, 2020
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
10 changes: 8 additions & 2 deletions docs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ chronological order. Releases follow `semantic versioning <https://semver.org/>`
all releases are available on `Anaconda.org <https://anaconda.org/pytask/pytask>`_.


0.0.11 - 2020-xx-xx
-------------------

- :gh:`47` reduce node names in error messages while resolving dependencies.
- :gh:`50` implements correct usage of singular and plural in collection logs.


0.0.10 - 2020-11-18
-------------------

Expand All @@ -14,8 +21,7 @@ all releases are available on `Anaconda.org <https://anaconda.org/pytask/pytask>
- :gh:`42` ensures that lists with one element and dictionaries with only a zero key as
input for ``@pytask.mark.depends_on`` and ``@pytask.mark.produces`` are preserved as a
dictionary inside the function.
- :gh:`43` releases v0.0.10
- :gh:`47` reduce node names in error messages while resolving dependencies.
- :gh:`43` releases v0.0.10.


0.0.9 - 2020-10-28
Expand Down
4 changes: 2 additions & 2 deletions src/_pytask/collect.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,11 @@ def pytask_collect_log(session, reports, tasks):
session.collection_end = time.time()
tm_width = session.config["terminal_width"]

message = f"Collected {len(tasks)} task(s)."
message = f"Collected {len(tasks)} task{'' if len(tasks) == 1 else 's'}."

n_deselected = len(session.deselected)
if n_deselected:
message += f" Deselected {n_deselected} task(s)."
message += f" Deselected {n_deselected} task{'' if n_deselected == 1 else 's'}."
click.echo(message)

failed_reports = [i for i in reports if not i.successful]
Expand Down