Skip to content

Commit c93d113

Browse files
committed
Do not expose anything at the root of modules
This ensure that we don't import something that is not strictly needed
1 parent 9023c77 commit c93d113

18 files changed

+17
-44
lines changed

cleo/__init__.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +0,0 @@
1-
from .application import Application
2-
from .commands import Command
3-
from .helpers import argument
4-
from .helpers import option
5-
from .testers import ApplicationTester
6-
from .testers import CommandTester
7-
8-
9-
__version__ = "1.0.0a0"

cleo/application.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from typing import Optional
88
from typing import cast
99

10-
from .commands import Command
10+
from .commands.command import Command
1111
from .commands.completions_command import CompletionsCommand
1212
from .commands.help_command import HelpCommand
1313
from .commands.list_command import ListCommand

cleo/commands/__init__.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +0,0 @@
1-
# -*- coding: utf-8 -*-
2-
3-
from .base_command import BaseCommand
4-
from .command import Command
5-
6-
__all__ = ["BaseCommand", "Command"]

cleo/testers/__init__.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +0,0 @@
1-
# -*- coding: utf-8 -*-
2-
3-
from .application_tester import ApplicationTester
4-
from .command_tester import CommandTester
5-
6-
__all__ = ["ApplicationTester", "CommandTester"]

cleo/testers/application_tester.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from io import StringIO
22
from typing import Optional
33

4-
from cleo import Application
4+
from cleo.application import Application
55
from cleo.io.buffered_io import BufferedIO
66
from cleo.io.inputs.string_input import StringInput
77
from cleo.io.outputs.output import Verbosity

cleo/testers/command_tester.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from io import StringIO
22
from typing import Optional
33

4-
from cleo.commands import Command
4+
from cleo.commands.command import Command
55
from cleo.io.buffered_io import BufferedIO
66
from cleo.io.inputs.argv_input import ArgvInput
77
from cleo.io.inputs.string_input import StringInput

tests/commands/completion/fixtures/command_with_colons.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
# -*- coding: utf-8 -*-
2-
3-
from cleo import Command
1+
from cleo.commands.command import Command
42

53

64
class CommandWithColons(Command):

tests/commands/completion/fixtures/hello_command.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
# -*- coding: utf-8 -*-
2-
3-
from cleo import Command
1+
from cleo.commands.command import Command
42

53

64
class HelloCommand(Command):

tests/commands/completion/test_completions_command.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
import pytest
66

7-
from cleo import Application
8-
from cleo import CommandTester
7+
from cleo.application import Application
8+
from cleo.testers.command_tester import CommandTester
99

1010
from .fixtures.command_with_colons import CommandWithColons
1111
from .fixtures.hello_command import HelloCommand

tests/commands/test_command.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from cleo.application import Application
22
from cleo.commands.command import Command
33
from cleo.helpers import argument
4-
from cleo.testers import CommandTester
4+
from cleo.testers.command_tester import CommandTester
55

66
from ..fixtures.inherited_command import ChildCommand
77
from ..fixtures.signature_command import SignatureCommand

0 commit comments

Comments
 (0)