Skip to content

Commit

Permalink
code quality
Browse files Browse the repository at this point in the history
  • Loading branch information
irenedea committed Mar 13, 2024
1 parent fb20988 commit 006b63a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composer/core/time.py
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ def get_state(self) -> Dict[str, Union[Time[int], datetime.timedelta]]:
Dict[str, Union[Time[int], datetime.timedelta]]: All values of the timestamp object.
"""
warnings.warn(
VersionedDeprecationWarning('core.time.Timestamp.get_state is deprecated.', remove_version='0.21.0')
VersionedDeprecationWarning('core.time.Timestamp.get_state is deprecated.', remove_version='0.21.0'),
)

return self.state_dict()
Expand Down
3 changes: 2 additions & 1 deletion tests/utils/test_warnings.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ def deprecated_function():
warnings.warn(VersionedDeprecationWarning('This function is deprecated.', remove_version='0.20.0'))

with pytest.warns(
VersionedDeprecationWarning, match='This function is deprecated. It will be removed in version 0.20.0.'
VersionedDeprecationWarning,
match='This function is deprecated. It will be removed in version 0.20.0.',
):
deprecated_function()

0 comments on commit 006b63a

Please sign in to comment.