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

flag expects arguments #80

Closed
twoertwein opened this issue Jul 14, 2022 · 2 comments
Closed

flag expects arguments #80

twoertwein opened this issue Jul 14, 2022 · 2 comments
Assignees
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@twoertwein
Copy link

Based on the readme, a flag is defined by type = "bool". It seems that flags still expect one arguments:

[tool.poetry]
name = "test"
version = "0.0.1"
description = "test"
authors = ["test"]
license = "BSD-3-Clause"
readme = "README.md"

[tool.poetry.dependencies]
python = "3.10"

[tool.poetry.dev-dependencies]
poethepoet = ">=0.15.0"

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

[tool.poe.tasks.test]
help = "Run tests"
script = "scripts.test:test(flag)"

    [[tool.poe.tasks.test.args]]
    help = "set flag"
    name = "flag"
    default = false
    type = "bool"
$ poe test --flag
usage: poe test [--flag FLAG]
poe test: error: argument --flag: expected one argument
@nat-n nat-n self-assigned this Jul 16, 2022
@nat-n nat-n added bug Something isn't working documentation Improvements or additions to documentation labels Jul 16, 2022
@nat-n
Copy link
Owner

nat-n commented Jul 16, 2022

Hi @twoertwein , thanks for reporting this.

I see three issues here. The first is that the the type is meant to be called "boolean". So if you update the type option to type = "boolean" then it should work as expected.

The other two issues are that poe should tell you that, and that the documentation gets this wrong in one place. I'll post a fix shortly, but I hope this information is enough to unblock you :)

nat-n added a commit that referenced this issue Jul 16, 2022
Also update the readme to always refer to the boolean type correctly.
@twoertwein
Copy link
Author

Thank you! Chaning bool to boolean works :)

@nat-n nat-n closed this as completed Jul 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants