Skip to content

Commit 62ebf0e

Browse files
committed
Fix tox
1 parent fbbcceb commit 62ebf0e

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

src/interactive_sort/main.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import bisect
44
import os
55
import re
6+
import sys
67
from functools import cmp_to_key
78

89

@@ -155,10 +156,10 @@ def key_func(x):
155156
def display_sorted(self):
156157
"""Displays the current sorted data."""
157158
output_stream = sys.stderr if self.args.stderr else sys.stdout
158-
159+
159160
if not self.args.stderr:
160-
os.system('cls' if os.name == 'nt' else 'clear')
161-
161+
os.system("cls" if os.name == "nt" else "clear")
162+
162163
print("--- Interactive Sorted Data ---", file=output_stream)
163164
items_to_display = self.data
164165
if self.args.unique:
@@ -176,7 +177,9 @@ def output_final_sorted(self):
176177
"""Outputs the final sorted data to stdout (used when stderr flag is set)."""
177178
items_to_display = self.data
178179
if self.args.unique:
179-
items_to_display = sorted(list(set(items_to_display)), key=lambda x: self.data.index(x)) # Maintain original order of first occurrence
180+
items_to_display = sorted(
181+
set(items_to_display), key=lambda x: self.data.index(x)
182+
) # Maintain original order of first occurrence
180183
if self.args.reverse:
181184
items_to_display = reversed(items_to_display)
182185

0 commit comments

Comments
 (0)