Skip to content

Commit

Permalink
Get rid of some TODOs/FIXMEs.
Browse files Browse the repository at this point in the history
  • Loading branch information
mlondschien committed Apr 27, 2021
1 parent 799ed45 commit 8f3eb7f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
6 changes: 1 addition & 5 deletions minimalkv/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def put_file(self, key: str, file: Union[str, File]) -> str:
:raises ValueError: If the key is not valid.
:raises IOError: If there was a problem moving the file in.
"""
# FIXME: shouldn't we call self._check_valid_key here?
self._check_valid_key(key)
if isinstance(file, str):
return self._put_filename(key, file)
else:
Expand Down Expand Up @@ -432,10 +432,6 @@ def put_file(
:raises IOError: If there was a problem moving the file in.
:raises ValueError: If ``ttl_secs`` is invalid.
"""
# TODO: Remove next two lines?
if ttl_secs is None:
ttl_secs = self.default_ttl_secs

self._check_valid_key(key)

if isinstance(file, str):
Expand Down
1 change: 0 additions & 1 deletion minimalkv/contrib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ def _check_valid_key(self, key: Optional[str]) -> None:
:param key: The key to be checked
"""
# TODO: Is there any case where key is None?
if key is not None:
if not isinstance(key, str):
raise ValueError("%r is not a valid key type" % key)
Expand Down

0 comments on commit 8f3eb7f

Please sign in to comment.