Skip to content

Fix some warnings from LGTM #2420

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Sep 13, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix assignment of a variable to itself
  • Loading branch information
Hasenn committed Sep 13, 2020
commit a5d5b08de04071517e3fe6b8d3c02b552afbb931
4 changes: 2 additions & 2 deletions ciphers/enigma_machine2.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ def _plugboard(pbstring: str) -> dict:
# a) is type string
# b) has even length (so pairs can be made)
if not isinstance(pbstring, str):
raise TypeError(f"Plugboard setting isn't type string ({type(pbstring)})")
raise TypeError(
f"Plugboard setting isn't type string ({type(pbstring)})")
elif len(pbstring) % 2 != 0:
raise Exception(f"Odd number of symbols ({len(pbstring)})")
elif pbstring == "":
Expand Down Expand Up @@ -218,7 +219,6 @@ def enigma(
rotorpos1 -= 1
rotorpos2 -= 1
rotorpos3 -= 1
plugboard = plugboard

result = []

Expand Down