Policy

Configurable policy rules for architecture and naming boundaries.

Enable with:

enable = ["policy"]

Rule

Message

Python

Autofix

forbidden-call

Do not call forbidden callable ‘{symbol}’.

Any

No

forbidden-import

Do not import across forbidden boundary ‘{boundary}’.

Any

No

forbidden-name

Do not use forbidden {kind} name ‘{name}’.

Any

No

line-count-limit

{target} has {actual_lines} lines, exceeding the configured limit of {max_lines}.

Any

No

no-unsafe-tempfile-factories

Use tempfile context managers instead of mkstemp or mkdtemp.

Any

No