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

Gracefully handle "task --list" when there are no tasks #52

Merged
merged 1 commit into from Aug 31, 2022

Conversation

illBeRoy
Copy link
Collaborator

Description

This PR adds graceful handling of the task --list command under two circumstances:

One: There is no "tasks" section in pyproject.toml:
image

Two: The "tasks" section is empty:
image

This also fixes issue #51

Changes

  1. Created two new test cases under ListTasksTestCase for each edge case
  2. Created a new exception class: EmptyTasksSectionError
  3. Updated HelpFormatter to raise the aforementioned exception in case the tasks list is empty
  4. Renamed HelpFormatter into TasksListFormatter to better emphasize its role in the system (also renamed file from help.py to list.py)

Copy link
Collaborator

@eugenetriguba eugenetriguba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks for fixing this 👍

@eugenetriguba
Copy link
Collaborator

Closes #51

@illBeRoy illBeRoy merged commit 62b47b6 into master Aug 31, 2022
@eugenetriguba eugenetriguba deleted the poetry-l-no-tasks branch May 20, 2023 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants