mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 09:21:13 +08:00
Adopt Python >= 3.8 assignment expressions using auto-walrus (#7737)
* Adopt Python >= 3.8 assignment expressions using auto-walrus * updating DIRECTORY.md * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@ -86,8 +86,7 @@ def _validator(
|
||||
"""
|
||||
# Checks if there are 3 unique rotors
|
||||
|
||||
unique_rotsel = len(set(rotsel))
|
||||
if unique_rotsel < 3:
|
||||
if (unique_rotsel := len(set(rotsel))) < 3:
|
||||
raise Exception(f"Please use 3 unique rotors (not {unique_rotsel})")
|
||||
|
||||
# Checks if rotor positions are valid
|
||||
|
Reference in New Issue
Block a user