mirror of
https://github.com/dmunozv04/iSponsorBlockTV.git
synced 2026-03-13 22:12:49 +03:00
Merge pull request #126 from dmunozv04/deepsource-autofix-097a200c
refactor: refactor unnecessary `else` / `elif` when `if` block has a `return` statement
This commit is contained in:
@@ -41,13 +41,11 @@ class AsyncConditionalTTL:
|
||||
def __contains__(self, key):
|
||||
if key not in self.keys():
|
||||
return False
|
||||
else:
|
||||
key_expiration = super().__getitem__(key)[1]
|
||||
if key_expiration and key_expiration < datetime.datetime.now():
|
||||
del self[key]
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
key_expiration = super().__getitem__(key)[1]
|
||||
if key_expiration and key_expiration < datetime.datetime.now():
|
||||
del self[key]
|
||||
return False
|
||||
return True
|
||||
|
||||
def __getitem__(self, key):
|
||||
value = super().__getitem__(key)[0]
|
||||
|
||||
Reference in New Issue
Block a user