I noticed a couple of places where type annotations could be relaxed.
write_jsonl could be changed from Sequence to Iterable
FilePath could be written as FilePath = Union[str, "os.PathLike[str]"]
The second change with os.PathLike could also come with some changes to force_path and force_string by removing some unnecessary isinstance(...) checks and usingos.fspath, respectively.
Would you be open to a PR with these changes? If so, I'd be happy to make the changes and open one.
Hi there!
I noticed a couple of places where type annotations could be relaxed.
write_jsonl
could be changed fromSequence
toIterable
FilePath
could be written asFilePath = Union[str, "os.PathLike[str]"]
The second change with
os.PathLike
could also come with some changes toforce_path
andforce_string
by removing some unnecessaryisinstance(...)
checks and usingos.fspath
, respectively.Would you be open to a PR with these changes? If so, I'd be happy to make the changes and open one.
Thanks!