forbidden-call¶
Ban calls to configured functions, constructors, and helper APIs.
Message¶
Do not call forbidden callable ‘{symbol}’.
Settings¶
| Setting | Description | Type | Default |
|---|---|---|---|
| forbidden_calls | — | list | [] |
Valid examples¶
typing.cast(str, value)
Show more
from typing import cast
def cast(value: object) -> object:
return value
result = cast(value)
import typing
value = typing.NamedTuple("Row", [("id", int)])
Invalid examples¶
import typing
value = typing.cast(str, value)
import typing as t
value = t.cast(str, value)
Show more
from typing import cast as type_cast
value = type_cast(str, value)
from typing_extensions import cast
value = cast(str, value)
import legacy_math
value = legacy_math.sqrt(4)