Skip to content
This repository was archived by the owner on Jul 2, 2024. It is now read-only.

Commit fa27184

Browse files
committed
Fix pylint and flake8 issues
1 parent f8cadfb commit fa27184

File tree

4 files changed

+24
-8
lines changed

4 files changed

+24
-8
lines changed

src/atm/func.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def withdraw_rev(target: int,
8686
8787
"""
8888

89-
raise NotImplementedError # TODO:
89+
raise NotImplementedError
9090

9191

9292
def get_total(values: Iterable[Tuple[int, int]]) -> int:

src/quiz/func.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def load_questions_from_file(source: Union[str, pathlib.Path]) -> Questions:
4343

4444
fieldnames = ["question", "options", "answer"]
4545
questions = []
46-
with open(source) as io_buff:
46+
with open(source) as io_buff: # pylint: disable=W1514
4747
reader = csv.DictReader(io_buff, fieldnames=fieldnames)
4848
for question in reader:
4949
questions.append({
@@ -64,9 +64,9 @@ def display_question(question: Question) -> None:
6464
6565
"""
6666

67-
print("%s\n" % question["question"])
67+
print("%s\n" % question["question"]) # pylint: disable=C0209
6868
for opt_idx, option in enumerate(question["options"], 1):
69-
print("%d: %s" % (opt_idx, option))
69+
print("%d: %s" % (opt_idx, option)) # pylint: disable=C0209
7070

7171

7272
def gather_answer(question: Question) -> int:

src/sequences/func.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ def add_spaces(origin: str) -> str:
247247
return "".join(f" {c}" if c.isupper() else c for c in origin).lstrip()
248248

249249

250+
# pylint: disable=C0103
250251
def get_consecutive_slices(origin: str, n: int) -> List[str]:
251252
"""
252253
Return possible slices of string as a collection consecutive lists
@@ -301,16 +302,20 @@ def is_vowel(char: str) -> bool:
301302
vowels = "aeiouAEIOU"
302303

303304
return char in vowels
305+
306+
304307
def remove_duplicate_lists(input_list):
305308
"""
306309
Remove duplicate lists from a list of lists.
307310
308-
:param input_list: List of lists
309-
:type input_list: list[list]
311+
:param input_list: collection of nested lists
312+
:type input_list: list
310313
311314
:return: List with duplicate lists removed
312-
:rtype: list[list]
315+
:rtype: list
316+
313317
"""
318+
314319
seen = set()
315320
result = []
316321

src/sorting/__init__.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,15 @@
6767
"shell_sort"
6868
]
6969

70-
from sorting.func import *
70+
from sorting.func import (
71+
bubble_sort,
72+
bucket_sort,
73+
counting_sort,
74+
heap_sort,
75+
insertion_sort,
76+
merge_sort,
77+
quick_sort,
78+
radix_sort,
79+
selection_sort,
80+
shell_sort,
81+
)

0 commit comments

Comments
 (0)