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

max() arg is an empty sequence error on listing empty tasks table #51

Closed
eugenetriguba opened this issue Aug 30, 2022 · 2 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@eugenetriguba
Copy link
Collaborator

If I have a pyproject.toml file with an empty [tool.taskipy.tasks] table, taskipy.help.HelpFormatter.print errors out on the call to max with "max() arg is an empty sequence". I'd expect that there should instead be an empty table printed or something like "No tasks."

$ ls
pyproject.toml
$ cat pyproject.toml
[tool.taskipy.tasks]
$ task -l
max() arg is an empty sequence
$ echo $?
1
$ echo 'test_task = "echo 'test'"' >> pyproject.toml
$ cat pyproject.toml
[tool.taskipy.tasks]
test_task = "echo test"
$ task -l
test_task echo test

Environment:

$ pip list
Package    Version
---------- -------
colorama   0.4.5
pip        22.0.4
psutil     5.9.1
setuptools 58.1.0
taskipy    1.10.2
tomli      2.0.1
@illBeRoy
Copy link
Collaborator

Hey! Thanks for the bug report!
I fixed the bug and opened a PR here: #52
Please review when you have some free time and I'll merge it once approved :)

@illBeRoy illBeRoy self-assigned this Aug 30, 2022
@illBeRoy
Copy link
Collaborator

Fix released as taskipy 1.10.13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants