Skip to content

Commit 61c1fad

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 369788d commit 61c1fad

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

ciphers/columnar_transposition.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,12 @@ def _normalize_key(key: str) -> str:
4040
def _column_order(key: str) -> list[int]:
4141
# Stable sort by character then original index to handle duplicates
4242
indexed = list(enumerate(key))
43-
return [i for i, _ in sorted(indexed, key=lambda indexed_pair: (indexed_pair[1], indexed_pair[0]))]
43+
return [
44+
i
45+
for i, _ in sorted(
46+
indexed, key=lambda indexed_pair: (indexed_pair[1], indexed_pair[0])
47+
)
48+
]
4449

4550

4651
def encrypt(plaintext: str, key: str) -> str:

0 commit comments

Comments
 (0)