Skip to content

future-feature-not-defined

Pythoncorrectnessno fixdefault: warnpython/ruff

Reports a name imported from __future__ that the module does not define.

Python rejects the file with SyntaxError: future feature ... is not defined, since __future__ has a fixed set of names (a misspelling, or a feature of a newer version).

To fix, correct the name or remove the import.

Reported
...
from __future__ import not_a_feature
...
python:
lint:
rules:
future-feature-not-defined: warn # off, warn (default), error

Enabled by the presets: python/ruff.

Suppress one line with sudsy-disable-next-line future-feature-not-defined in a comment of the file’s language.

The same check in other tools; Sudsy reports what each upstream rule reports.

Tool Rule Match
ruff F407 full