Skip to content

Commit 8cea0b2

Browse files
client: Fixed issues identified by beauxq in PR; fixed some typing issues
1 parent 126adba commit 8cea0b2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

kvui.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -387,14 +387,14 @@ def insert_text(self, substring, from_undo=False):
387387

388388

389389
def is_command_input(string: str) -> bool:
390-
return string and string[0] in "/!"
390+
return len(string) > 0 and string[0] in "/!"
391391

392392

393393
class CommandPromptTextInput(TextInput):
394394
MAXIMUM_HISTORY_MESSAGES = 50
395395

396-
def __init__(self, *args, **kwargs) -> None:
397-
super().__init__(*args, **kwargs)
396+
def __init__(self, **kwargs) -> None:
397+
super().__init__(**kwargs)
398398
self._command_history_index = -1
399399
self._command_history: typing.List[str] = []
400400

@@ -475,7 +475,7 @@ def __init__(self, ctx: context_type):
475475
self.commandprocessor = ctx.command_processor(ctx)
476476
self.icon = r"data/icon.png"
477477
self.json_to_kivy_parser = KivyJSONtoTextParser(ctx)
478-
self.log_panels = {}
478+
self.log_panels: typing.Dict[str, Widget] = {}
479479

480480
# keep track of last used command to autofill on click
481481
self.last_autofillable_command = "hint"

0 commit comments

Comments
 (0)