Poetry: endpoints with endpoints

Liste des GroupesRevenir à cl python 
Sujet : Poetry: endpoints with endpoints
De : loris.bennett (at) *nospam* fu-berlin.de (Loris Bennett)
Groupes : comp.lang.python
Date : 31. Oct 2024, 12:05:50
Autres entêtes
Organisation : FUB-IT, Freie Universität Berlin
Message-ID : <874j4sbkhd.fsf@zedat.fu-berlin.de>
User-Agent : Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
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.

Date Sujet#  Auteur
31 Oct 24 o Poetry: endpoints with endpoints1Loris Bennett

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal