Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing annotations for ViomiVacuum #872

Merged
merged 1 commit into from
Nov 28, 2020
Merged
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
6 changes: 3 additions & 3 deletions miio/viomivacuum.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ def home(self):
help="number of seconds to perform this movement",
),
)
def move(self, direction, duration=0.5):
def move(self, direction: ViomiMovementDirection, duration=0.5):
"""Manual movement."""
start = time.time()
while time.time() - start < duration:
Expand All @@ -374,12 +374,12 @@ def move(self, direction, duration=0.5):
self.send("set_direction", [ViomiMovementDirection.Stop.value])

@command(click.argument("mode", type=EnumType(ViomiMode)))
def clean_mode(self, mode):
def clean_mode(self, mode: ViomiMode):
"""Set the cleaning mode."""
self.send("set_mop", [mode.value])

@command(click.argument("mop_mode", type=EnumType(ViomiMopMode)))
def mop_mode(self, mop_mode):
def mop_mode(self, mop_mode: ViomiMopMode):
self.send("set_moproute", [mop_mode.value])

@command()
Expand Down