From 3f2b238c34cd926b335d1f6f750e009f08e8f270 Mon Sep 17 00:00:00 2001 From: Username Date: Tue, 14 Sep 2021 15:30:42 -0400 Subject: [PATCH] Fixed type annotations --- ciphers/enigma_machine2.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ciphers/enigma_machine2.py b/ciphers/enigma_machine2.py index f4ce5a075..b2b2953f4 100644 --- a/ciphers/enigma_machine2.py +++ b/ciphers/enigma_machine2.py @@ -14,9 +14,9 @@ Module includes: Created by TrapinchO """ - -RotorPositionT = tuple[int, int, int] -RotorSelectionT = tuple[str, str, str] +from typing import Tuple, Dict +RotorPositionT = Tuple[int, int, int] +RotorSelectionT = Tuple[str, str, str] # used alphabet -------------------------- @@ -69,7 +69,7 @@ rotor9 = "KOAEGVDHXPQZMLFTYWJNBRCIUS" def _validator( rotpos: RotorPositionT, rotsel: RotorSelectionT, pb: str -) -> tuple[RotorPositionT, RotorSelectionT, dict[str, str]]: +) -> tuple[RotorPositionT, RotorSelectionT, Dict[str, str]]: """ Checks if the values can be used for the 'enigma' function @@ -110,7 +110,7 @@ def _validator( return rotpos, rotsel, pbdict -def _plugboard(pbstring: str) -> dict[str, str]: +def _plugboard(pbstring: str) -> Dict[str, str]: """ https://en.wikipedia.org/wiki/Enigma_machine#Plugboard