@@ -91,9 +91,9 @@ so initialize the command-line interface here:
9191
9292.. code-block :: python
9393
94- if __name__ == " __main__" :
95- from greetings.cli import app
96- app()
94+ if __name__ == " __main__" :
95+ from greetings.cli import app
96+ app()
9797
9898 .. note ::
9999
@@ -112,8 +112,8 @@ For the project to be recognised as a command-line tool, additionally a ``consol
112112
113113.. code-block :: toml
114114
115- [project.scripts]
116- greet = "greetings.cli:app"
115+ [project.scripts]
116+ greet = "greetings.cli:app"
117117
118118 Now, the project's source tree is ready to be transformed into a :term: `distribution package <Distribution Package> `,
119119which makes it installable.
@@ -134,14 +134,14 @@ Let's test it:
134134
135135.. code-block :: console
136136
137- $ greet
138- Greetings, friend!
139- $ greet --doctor Brennan
140- Greetings, Dr. Brennan!
141- $ greet --title Ms. Parks
142- Greetings, Ms. Parks!
143- $ greet --title Mr.
144- Greetings, Mr. mr!
137+ $ greet
138+ Greetings, friend!
139+ $ greet --doctor Brennan
140+ Greetings, Dr. Brennan!
141+ $ greet --title Ms. Parks
142+ Greetings, Ms. Parks!
143+ $ greet --title Mr.
144+ Greetings, Mr. mr!
145145
146146 Since this example uses ``typer ``, you could now also get an overview of the program's usage by calling it with
147147the ``--help `` option, or configure completions via the ``--install-completion `` option.
@@ -151,7 +151,7 @@ To just run the program without installing it permanently, use ``pipx run``, whi
151151
152152.. code-block :: console
153153
154- $ pipx run --spec . greet --doctor
154+ $ pipx run --spec . greet --doctor
155155
156156 This syntax is a bit impractical, however; as the name of the entry point we defined above does not match the package name,
157157we need to state explicitly which executable script to run (even though there is only one in existence).
0 commit comments