Skip to content

Commit d5d84e0

Browse files
committed
[MZ] Removed not needed typing
1 parent 11fc99d commit d5d84e0

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

app.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import asyncio
44
import logging
5-
from typing import Any, Union
65

76
import coloredlogs
87

@@ -45,14 +44,14 @@ def datagram_received(self, data, addr) -> None: # type: ignore
4544
print(formatted_message)
4645

4746

48-
def handle_error(message: str) -> Union[str, Any]:
47+
def handle_error(message: str) -> str:
4948
logger.warning(f"Unknown command: {message}")
5049
return f"Unknown command: {message}"
5150

5251

5352
def format_message(
5453
message: str, multiplier: int, separator: str, translation_toggle: bool
55-
) -> Union[str, Any]:
54+
) -> str:
5655
logger.debug(f"Formatting message: {message}")
5756

5857
params = message.split()
@@ -63,7 +62,7 @@ def format_message(
6362
try:
6463
nb_repetitions, command = int(params[0]), params[1]
6564
text = TRANSLATION_TABLE[command]
66-
except (ValueError, KeyError, IndexError) as e:
65+
except (ValueError, KeyError, IndexError):
6766
return handle_error(message)
6867

6968
response = (

0 commit comments

Comments
 (0)