Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion devtools/parse_pcap.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import dpkt
from dpkt.ethernet import ETH_TYPE_IP, Ethernet

from kasa.cli import echo
from kasa.cli.main import echo
from kasa.xortransport import XorEncryption


Expand Down
1 change: 1 addition & 0 deletions kasa/cli/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Package for the cli."""
5 changes: 5 additions & 0 deletions kasa/cli/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
"""Main module."""

from kasa.cli.main import cli

cli()
File renamed without changes.
6 changes: 3 additions & 3 deletions kasa/tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Module,
UnsupportedDeviceError,
)
from kasa.cli import (
from kasa.cli.main import (
TYPE_TO_CLASS,
alias,
brightness,
Expand Down Expand Up @@ -500,7 +500,7 @@ async def _state(dev: Device):
f"Username:{dev.credentials.username} Password:{dev.credentials.password}"
)

mocker.patch("kasa.cli.state", new=_state)
mocker.patch("kasa.cli.main.state", new=_state)

dr = DiscoveryResult(**discovery_mock.discovery_data["result"])
res = await runner.invoke(
Expand Down Expand Up @@ -746,7 +746,7 @@ async def _state(dev: Device):
nonlocal result_device
result_device = dev

mocker.patch("kasa.cli.state", new=_state)
mocker.patch("kasa.cli.main.state", new=_state)
expected_type = TYPE_TO_CLASS[device_type]
mocker.patch.object(expected_type, "update")
res = await runner.invoke(
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ include = [
"Documentation" = "https://python-kasa.readthedocs.io"

[tool.poetry.scripts]
kasa = "kasa.cli:cli"
kasa = "kasa.cli:__main__"

[tool.poetry.dependencies]
python = "^3.9"
Expand Down