Skip to content

Commit 153c693

Browse files
committed
switch over all imports out of django_typer namespace
1 parent 9fb94db commit 153c693

File tree

145 files changed

+174
-167
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

145 files changed

+174
-167
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Please refer to the [full documentation](https://django-typer.readthedocs.io/) f
6161
[TyperCommand](https://django-typer.readthedocs.io/en/latest/reference.html#django_typer.TyperCommand) is a very simple drop in replacement for [BaseCommand](https://docs.djangoproject.com/en/stable/howto/custom-management-commands/#django.core.management.BaseCommand). All of the documented features of [BaseCommand](https://docs.djangoproject.com/en/stable/howto/custom-management-commands/#django.core.management.BaseCommand) work the same way!
6262

6363
```python
64-
from django_typer import TyperCommand
64+
from django_typer.management import TyperCommand
6565

6666
class Command(TyperCommand):
6767
def handle(self, arg1: str, arg2: str, arg3: float = 0.5, arg4: int = 1):
@@ -73,7 +73,7 @@ class Command(TyperCommand):
7373
Or, you may also use an interface identical to [Typer](https://typer.tiangolo.com/)'s. Simply import [Typer](https://typer.tiangolo.com/) from django_typer instead of typer.
7474

7575
```python
76-
from django_typer import Typer
76+
from django_typer.management import Typer
7777

7878
app = Typer()
7979

@@ -98,7 +98,7 @@ Commands with multiple subcommands can be defined:
9898
from django.utils.translation import gettext_lazy as _
9999
from typer import Argument
100100

101-
from django_typer import TyperCommand, command
101+
from django_typer.management import TyperCommand, command
102102

103103

104104
class Command(TyperCommand):
@@ -128,7 +128,7 @@ Commands with multiple subcommands can be defined:
128128
Or using the typer-style interface this could be written:
129129

130130
```python
131-
from django_typer import Typer
131+
from django_typer.management import Typer
132132
import typing as t
133133

134134
from django.utils.translation import gettext_lazy as _
@@ -176,7 +176,7 @@ Using the class-based interface we could define the command like this:
176176
from django.utils.translation import gettext_lazy as _
177177
from typer import Argument, Option
178178

179-
from django_typer import TyperCommand, group
179+
from django_typer.management import TyperCommand, group
180180

181181

182182
class Command(TyperCommand):
@@ -232,7 +232,7 @@ from functools import reduce
232232
from django.utils.translation import gettext_lazy as _
233233
from typer import Argument, Option
234234

235-
from django_typer import Typer
235+
from django_typer.management import Typer
236236

237237

238238
app = Typer(help=_("A more complex command that defines a hierarchy of subcommands."))

django_typer/completers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ def complete_app_label(
365365
366366
import typing as t
367367
import typer
368-
from django_typer import TyperCommand
368+
from django_typer.management import TyperCommand
369369
from django_typer.parsers import parse_app_label
370370
from django_typer.completers import complete_app_label
371371

django_typer/parsers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def parse_app_label(label: t.Union[str, AppConfig]):
170170
171171
import typing as t
172172
import typer
173-
from django_typer import TyperCommand
173+
from django_typer.management import TyperCommand
174174
from django_typer.parsers import parse_app_label
175175
176176
class Command(TyperCommand):

doc/source/howto.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ like have multiple subcommands you can define any number of functions decorated
9999

100100
.. code-block:: python
101101
102-
from django_typer import TyperCommand, command
102+
from django_typer.management importTyperCommand, command
103103
104104
class Command(TyperCommand):
105105
@@ -115,7 +115,7 @@ like have multiple subcommands you can define any number of functions decorated
115115

116116
.. code-block:: python
117117
118-
from django_typer import Typer
118+
from django_typer.management import Typer
119119
120120
app = Typer()
121121
@@ -134,7 +134,7 @@ like have multiple subcommands you can define any number of functions decorated
134134

135135
.. code-block:: python
136136
137-
from django_typer import get_command
137+
from django_typer.management import get_command
138138
139139
command = get_command("mycommand")
140140
command.subcommand1()
@@ -169,7 +169,7 @@ default we can do this:
169169

170170
.. code-block:: python
171171
172-
from django_typer import get_command
172+
from django_typer.management import get_command
173173
174174
command = get_command("mycommand")
175175
assert command.subcommand2() == 'subcommand2'
@@ -253,7 +253,7 @@ This is like defining a group at the command root and is an extension of the
253253
254254
.. code-block:: python
255255
256-
from django_typer import get_command
256+
from django_typer.management import get_command
257257
258258
command = get_command("initializer")
259259
command.init(common_option=True)
@@ -274,7 +274,7 @@ Say we have this command, called ``mycommand``:
274274

275275
.. code-block:: python
276276
277-
from django_typer import TyperCommand, command
277+
from django_typer.management import TyperCommand, command
278278
279279
class Command(TyperCommand):
280280
@@ -285,7 +285,7 @@ Say we have this command, called ``mycommand``:
285285
.. code-block:: python
286286
287287
from django.core.management import call_command
288-
from django_typer import get_command
288+
from django_typer.management import get_command
289289
290290
# we can use use call_command like with any Django command
291291
call_command("mycommand", count=10)
@@ -311,7 +311,7 @@ to be of that type:
311311

312312
.. code-block:: python
313313
314-
from django_typer import get_command
314+
from django_typer.management import get_command
315315
from myapp.management.commands.math import Command as Math
316316
317317
math = get_command("math", Math)

doc/source/shell_completion.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ shells support. Refer to the reference documentation and the
409409
410410
import typing as t
411411
import typer
412-
from django_typer import model_parser_completer
412+
from django_typer.management import model_parser_completer
413413
414414
...
415415

examples/basic/management/commands/basic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from django_typer import TyperCommand
1+
from django_typer.management import TyperCommand
22

33

44
class Command(TyperCommand):

examples/basic/management/commands/hierarchy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from django.utils.translation import gettext_lazy as _
55
from typer import Argument, Option
66

7-
from django_typer import TyperCommand, group
7+
from django_typer.management import TyperCommand, group
88

99

1010
class Command(TyperCommand):

examples/basic/management/commands/multi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from django.utils.translation import gettext_lazy as _
44
from typer import Argument
55

6-
from django_typer import TyperCommand, command
6+
from django_typer.management import TyperCommand, command
77

88

99
class Command(TyperCommand):

examples/completers/management/commands/app_labels.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from click.shell_completion import CompletionItem
55
from django.apps import apps
66

7-
from django_typer import TyperCommand, command
7+
from django_typer.management import TyperCommand, command
88

99

1010
# the completer function signature must match this exactly

examples/completers/management/commands/app_labels_typer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from click.shell_completion import CompletionItem
55
from django.apps import apps
66

7-
from django_typer import Typer
7+
from django_typer.management import Typer
88

99
app = Typer()
1010

0 commit comments

Comments
 (0)