Skip to content

Commit

Permalink
Improve deprecation messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
ynikitenko committed May 14, 2021
1 parent 73e57a0 commit 3a49142
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lena/flow/iterators.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def __call__(self):

def ISlice(*args, **kwargs):
"""Deprecated since Lena 0.4. Use :class:`Slice`."""
warnings.warn("ISlice is deprecated since Lena 0.4. Use Slice.",
warnings.warn("ISlice is deprecated since Lena 0.4. Use Slice. In:",
DeprecationWarning, stacklevel=2)
return Slice(*args, **kwargs)

Expand Down
5 changes: 2 additions & 3 deletions lena/output/write.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

def Writer(*args, **kwargs):
"""Deprecated since Lena 0.4. Use :class:`Write`."""
warnings.warn("Writer is deprecated since Lena 0.4. Use Write.",
warnings.warn("Writer is deprecated since Lena 0.4. Use Write. In:",
DeprecationWarning, stacklevel=2)
return Write(*args, **kwargs)

Expand Down Expand Up @@ -45,8 +45,7 @@ def __init__(self, output_directory="", output_filename="output",
*existing_unchanged* and *overwrite* are used during :meth:`run`
to change the handling of existing files.
They are mutually exclusive:
if one tries to use them simultaneously,
:exc:`.LenaValueError` is raised.
simultaneous use raises :exc:`.LenaValueError`.
"""
self.output_directory = output_directory
self._output_filename = output_filename
Expand Down

0 comments on commit 3a49142

Please sign in to comment.