Skip to content

Commit

Permalink
Corrects docstrings.
Browse files Browse the repository at this point in the history
  • Loading branch information
jevandezande committed May 1, 2024
1 parent 00230d6 commit 1b16c7f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion file_iter/file_iter.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ def filtered_next(
Get the next element in the iterator that passes the filter function.
:param filter_func: a function that checks if the line is valid
:yield: the next element in the iterator that passes the filter function
>>> file_iter = FileIter(["", "# comment", "hello"])
>>> file_iter.filtered_next(is_data)
Expand Down Expand Up @@ -371,7 +372,7 @@ def tmp_file(data_str: str, gzipped=False, **kwargs: Any) -> Iterable[IO[str]]:
:param data_str: the string to write to the file
:param gzipped: whether to write a gzipped file
:param kwargs: additional keyword arguments to pass to NamedTemporaryFile
:return: a readable/writable file object
:yield: a readable/writable file object
>>> with tmp_file("Hello\nWorld") as f:
... for line in f:
Expand Down

0 comments on commit 1b16c7f

Please sign in to comment.