Skip to content

Commit

Permalink
append_to_stem: Move import into method (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
LightArrowsEXE authored Jun 7, 2024
1 parent 35c3125 commit 61842ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stgpytools/types/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
from pathlib import Path
from typing import TYPE_CHECKING, Any, Callable, Iterable, Literal, TypeAlias, Union

from ..functions import to_arr

__all__ = [
'FilePathType', 'FileDescriptor',
'FileOpener',
Expand Down Expand Up @@ -118,6 +116,8 @@ def write_lines(
def append_to_stem(self, suffixes: str | Iterable[str], sep: str = '_') -> SPath:
"""Append a suffix to the stem of the path"""

from ..functions import to_arr

return self.with_stem(sep.join([self.stem, *to_arr(suffixes)])) # type:ignore[list-item]


Expand Down

0 comments on commit 61842ba

Please sign in to comment.