Skip to content

Commit 3f2b238

Browse files
committed
Fixed type annotations
1 parent dcacc95 commit 3f2b238

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Diff for: ciphers/enigma_machine2.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
1515
Created by TrapinchO
1616
"""
17-
18-
RotorPositionT = tuple[int, int, int]
19-
RotorSelectionT = tuple[str, str, str]
17+
from typing import Tuple, Dict
18+
RotorPositionT = Tuple[int, int, int]
19+
RotorSelectionT = Tuple[str, str, str]
2020

2121

2222
# used alphabet --------------------------
@@ -69,7 +69,7 @@
6969

7070
def _validator(
7171
rotpos: RotorPositionT, rotsel: RotorSelectionT, pb: str
72-
) -> tuple[RotorPositionT, RotorSelectionT, dict[str, str]]:
72+
) -> tuple[RotorPositionT, RotorSelectionT, Dict[str, str]]:
7373
"""
7474
Checks if the values can be used for the 'enigma' function
7575
@@ -110,7 +110,7 @@ def _validator(
110110
return rotpos, rotsel, pbdict
111111

112112

113-
def _plugboard(pbstring: str) -> dict[str, str]:
113+
def _plugboard(pbstring: str) -> Dict[str, str]:
114114
"""
115115
https://en.wikipedia.org/wiki/Enigma_machine#Plugboard
116116

0 commit comments

Comments
 (0)