Skip to content

Commit a8ac4fc

Browse files
committed
Clarify script entry point object references
1 parent 8db4324 commit a8ac4fc

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎source/guides/writing-pyproject-toml.rst‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,10 @@ In this example, after installing your project, a ``spam-cli`` command
208208
will be available. Executing this command will do the equivalent of
209209
``import sys; from spam import main_cli; sys.exit(main_cli())``.
210210

211-
Script entry points must use the ``module:object`` form. The object
212-
reference should point to a function that can be called with no arguments,
213-
not to a module by itself.
211+
Script entry points are written as :ref:`object references <entry-points>`,
212+
such as ``importable.module`` or ``importable.module:object.attr``. For
213+
script commands, the object reference should usually point to a callable object
214+
that can be called with no arguments, rather than to a module by itself.
214215

215216
On Windows, scripts packaged this way need a terminal, so if you launch
216217
them from within a graphical application, they will make a terminal pop

0 commit comments

Comments
 (0)