BSK-0040
analyze
Lambda function missing type annotations
Emitted when a lambda function is assigned to a variable without type annotations. This is a warning rather than an error since lambda functions are often used for simple operations where type annotations might be considered verbose.
# BAD (warning)
f = lambda x: x + 1 # W: lambda assigned to unannotated variable 'f'
# GOOD
f: Callable[[int], int] = lambda x: x + 1 # OK: variable has type annotation
How to handle it
This Basilisk-specific rule is off by default. Enable its strictness tag
when the policy fits your project, then configure its severity globally or per path in
pyproject.toml.
Canonical URL: https://www.basilisk-python.dev/errors/BSK-0040