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

@@ -14,7 +14,7 @@ def default_key_builder(
args: Tuple[Any, ...],
kwargs: Dict[str, Any],
) -> str:
cache_key = hashlib.md5( # nosec:B303
cache_key = hashlib.md5( # noqa: S324
f"{func.__module__}:{func.__name__}:{args}:{kwargs}".encode()
).hexdigest()
return f"{namespace}:{cache_key}"