Skip to content

Commit 1ab569b

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 8333ebf commit 1ab569b

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

digital_image_processing/change_brightness.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
Module for adjusting the brightness of images using PIL.
33
"""
4+
45
from PIL import Image
56

67

graphs/g_topological_sort.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@
1919
class TopologicalSort:
2020
"""Topological sort implementation using DFS."""
2121

22-
def __init__(self, graph: list[list[int]], labels: dict[int, str] | None = None) -> None:
22+
def __init__(
23+
self, graph: list[list[int]], labels: dict[int, str] | None = None
24+
) -> None:
2325
"""Initialize the topological sorter.
2426
2527
Args:

searches/sentinel_linear_search.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
For manual testing run:
1313
python sentinel_linear_search.py
1414
"""
15+
1516
from collections.abc import Sequence
1617
from typing import Any
1718

sorts/pancake_sort.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
For manual testing run:
1414
python pancake_sort.py
1515
"""
16+
1617
from collections.abc import Collection
1718
from typing import Any
1819

@@ -45,7 +46,7 @@ def pancake_sort(arr: list) -> list:
4546
max_index = result[:cur].index(max(result[:cur]))
4647

4748
# Flip from 0 to max_index to move max to the front
48-
result[:max_index + 1] = result[:max_index + 1][::-1]
49+
result[: max_index + 1] = result[: max_index + 1][::-1]
4950

5051
# Flip from 0 to cur-1 to move max to its correct position
5152
result[:cur] = result[:cur][::-1]

0 commit comments

Comments
 (0)