Skip to content

Commit

Permalink
Make flake8 happy
Browse files Browse the repository at this point in the history
  • Loading branch information
dormant-user committed Jan 28, 2024
1 parent 0da48c9 commit ad87571
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pystream/models/squire.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,11 @@ def get_iter(filename: pathlib.PurePath) -> Union[Tuple[str, str], Tuple[None, N
Tuple[str, str]:
Tuple of previous file and next file.
"""
dir_content = sorted((file for file in os.listdir(filename.parent) if pathlib.PosixPath(file).suffix in config.env.file_formats),
key=lambda x: natural_sort_key(x))
# Extract only the file formats that are supported
dir_content = sorted(
(file for file in os.listdir(filename.parent) if pathlib.PosixPath(file).suffix in config.env.file_formats),
key=lambda x: natural_sort_key(x)
)
idx = dir_content.index(filename.name)
try:
previous_ = dir_content[idx - 1]
Expand Down

0 comments on commit ad87571

Please sign in to comment.