mirror of
https://github.com/long2ice/fastapi-cache.git
synced 2026-03-24 20:47:54 +00:00
Add flake8-bandit linting (#156)
The linter has been used in the past, so most assertions for these were already there but needed to be updated to use `noqa: S` instead of `nosec: B` annotations.
This commit is contained in:
@@ -171,7 +171,7 @@ def cache(
|
||||
)
|
||||
if isawaitable(cache_key):
|
||||
cache_key = await cache_key
|
||||
assert isinstance(cache_key, str)
|
||||
assert isinstance(cache_key, str) # noqa: S101 # assertion is a type guard
|
||||
|
||||
try:
|
||||
ttl, cached = await backend.get_with_ttl(cache_key)
|
||||
|
||||
Reference in New Issue
Block a user