From 8f3eb7f790d0fa0fffbf4f23127e6fb012db92e3 Mon Sep 17 00:00:00 2001 From: Malte Londschien Date: Tue, 27 Apr 2021 08:07:17 +0200 Subject: [PATCH] Get rid of some TODOs/FIXMEs. --- minimalkv/__init__.py | 6 +----- minimalkv/contrib/__init__.py | 1 - 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/minimalkv/__init__.py b/minimalkv/__init__.py index 095c12e3..269786cc 100644 --- a/minimalkv/__init__.py +++ b/minimalkv/__init__.py @@ -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: @@ -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): diff --git a/minimalkv/contrib/__init__.py b/minimalkv/contrib/__init__.py index 874fa86c..76009dd3 100644 --- a/minimalkv/contrib/__init__.py +++ b/minimalkv/contrib/__init__.py @@ -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)