Skip to content

Commit 3bd4012

Browse files
committed
Fix linting
1 parent bfd473e commit 3bd4012

3 files changed

Lines changed: 11 additions & 5 deletions

File tree

src/tests/test_output.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212

1313
# ## Python StdLib Imports ----
1414
import logging
15-
from typing import Generator, Literal, Union
15+
from collections.abc import Generator
16+
from typing import Literal, Union
1617
from unittest import TestCase
1718

1819
# ## Python Third Party Imports ----
@@ -262,7 +263,9 @@ def test_5_rowwise(self) -> None:
262263
assert output == expected
263264

264265
@parameterized.expand([("list"), ("tuple"), ("set"), ("generator")])
265-
def test_6_types(self, input_type: Literal["list", "tuple", "set", "generator"]) -> None:
266+
def test_6_types(
267+
self, input_type: Literal["list", "tuple", "set", "generator"]
268+
) -> None:
266269
words: str_list = self.get_list_of_words(4 * 3)
267270
expected: str = "\n".join(
268271
[

src/toolbox_python/lists.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ def flatten(
195195
"""
196196
return list(
197197
itertools_collapse(
198-
iterable=list_of_lists,
198+
iterable=list_of_lists, # type: ignore
199199
base_type=base_type,
200200
levels=levels,
201201
)

src/toolbox_python/output.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,10 @@
3939

4040

4141
# ## Python StdLib Imports ----
42+
from collections.abc import Generator
4243
from logging import Logger, _nameToLevel
4344
from math import ceil
44-
from typing import Any, Generator, Literal, Optional, Union
45+
from typing import Any, Literal, Optional, Union
4546

4647
# ## Python Third Party Imports ----
4748
from typeguard import typechecked
@@ -382,7 +383,9 @@ def list_columns(
382383
]
383384
if columnwise:
384385
if len(segmented_list[-1]) != cols_wide:
385-
segmented_list[-1].extend([""] * (len(string_list) - len(segmented_list[-1])))
386+
segmented_list[-1].extend(
387+
[""] * (len(string_list) - len(segmented_list[-1]))
388+
)
386389
combined_list: Union[list[str_list], Any] = zip(*segmented_list)
387390
else:
388391
combined_list = segmented_list

0 commit comments

Comments
 (0)