Skip to content

Commit 885262d

Browse files
committed
readme tweaks
1 parent bee0688 commit 885262d

File tree

3 files changed

+2
-8
lines changed

3 files changed

+2
-8
lines changed

README.rst

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@ Or commands with multiple subcommands can be defined:
154154
"""
155155
Create an object.
156156
"""
157-
...
158157
159158
@command()
160159
def delete(
@@ -163,7 +162,6 @@ Or commands with multiple subcommands can be defined:
163162
"""
164163
Delete an object.
165164
"""
166-
...
167165
168166
169167
.. image:: https://raw.githubusercontent.com/bckohan/django-typer/main/django_typer/examples/helps/multi.svg
@@ -232,8 +230,7 @@ for arbitrarily complex command hierarchies.
232230
t.List[float], Argument(help=_("The numbers to multiply"))
233231
],
234232
):
235-
if numbers:
236-
return f"{reduce(lambda x, y: x * y, [1, *numbers]):.{self.precision}f}"
233+
return f"{reduce(lambda x, y: x * y, [1, *numbers]):.{self.precision}f}"
237234
238235
@math.command()
239236
def divide(

django_typer/examples/hierarchy.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ def multiply(
2929
t.List[float], Argument(help=_("The numbers to multiply"))
3030
],
3131
):
32-
if numbers:
33-
return f"{reduce(lambda x, y: x * y, [1, *numbers]):.{self.precision}f}"
32+
return f"{reduce(lambda x, y: x * y, [1, *numbers]):.{self.precision}f}"
3433

3534
@math.command()
3635
def divide(

django_typer/examples/multi.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ def create(
1919
"""
2020
Create an object.
2121
"""
22-
...
2322

2423
@command()
2524
def delete(
@@ -28,4 +27,3 @@ def delete(
2827
"""
2928
Delete an object.
3029
"""
31-
...

0 commit comments

Comments
 (0)