Skip to content

Commit 5b93e2b

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 3aac7a0 commit 5b93e2b

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

bit_manipulation/next_higher_same_ones.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
...
2727
ValueError: n must be a non-negative integer
2828
"""
29+
2930
from __future__ import annotations
3031

3132

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)