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:
Martijn Pieters
2023-05-16 13:11:10 +01:00
committed by GitHub
parent cbad93c970
commit 50e3f91a87
5 changed files with 13 additions and 9 deletions

View File

@@ -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)