• Poetry: endpoints with endpoints

    From Loris Bennett@21:1/5 to All on Thu Oct 31 12:05:50 2024
    Hi,

    I am using Poetry and have the following in my pyproj.toml

    [tool.poetry.scripts]
    frobnicate = "frobnicator.cli:frobnicate"

    The CLI provides an option '--flavour' and I would like to add further endpoints for specific values of 'flavour'. I tried adding

    frobnicate_foo = "frobnicator.cli:frobnicate --flavour foo"

    to '[tool.poetry.scripts]', but when I call this I get the error

    $ poetry run frobnicate_foo --verbose
    File "<string>", line 1
    import sys; from importlib import import_module; sys.argv = ['frobnicate, '--verbose']; import_module('frobniator.cli').frobnicate --flavour foo()
    ^
    SyntaxError: invalid syntax

    Is it possible to add such endpoint? If so, how?

    Cheers,

    Loris

    --
    This signature is currently under constuction.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)