Skip to content

Commit

Permalink
Fixed mypy Errors
Browse files Browse the repository at this point in the history
  • Loading branch information
stegm committed Dec 5, 2024
1 parent 254eaea commit 8012311
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pykoplenti/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ async def prepare_client(self, key: Optional[str], service_code: Optional[str]):
session_id = self._session_cache.read_session_id()
if session_id is not None:
self.client.session_id = session_id
print_formatted_text("Trying to reuse existing session... ", end=None)
print_formatted_text("Trying to reuse existing session... ", end="")
me = await self.client.get_me()
if me.is_authenticated:
print_formatted_text("Success")
Expand All @@ -68,8 +68,9 @@ async def prepare_client(self, key: Optional[str], service_code: Optional[str]):
print_formatted_text("Failed")

if key is not None:
print_formatted_text("Logging in... ", end=None)
print_formatted_text("Logging in... ", end="")
await self.client.login(key=key, service_code=service_code)
assert self.client.session_id is not None
self._session_cache.write_session_id(self.client.session_id)
print_formatted_text("Success")
else:
Expand All @@ -80,7 +81,7 @@ def print_exception(self):
print_formatted_text(traceback.format_exc())

async def run(self, key: Optional[str], service_code: Optional[str]):
session = PromptSession()
session = PromptSession[str]()
print_formatted_text(flush=True) # Initialize output

# Test commands:
Expand Down

0 comments on commit 8012311

Please sign in to comment.