LinuxCommandLibrary

pyflakes

Fast static error checker for Python

TLDR

Check Python file for errors

$ pyflakes [file.py]
copy
Check multiple files
$ pyflakes [file1.py] [file2.py]
copy
Check from stdin
$ cat [file.py] | pyflakes
copy

SYNOPSIS

pyflakes [files]

DESCRIPTION

pyflakes is a fast, lightweight static analysis tool that checks Python source files for common errors without executing them. It detects issues like undefined names, unused imports, redefined variables, and other logical mistakes that would cause runtime failures.
Unlike pylint or flake8, pyflakes focuses exclusively on error detection and does not check code style or formatting. This narrow scope makes it significantly faster and produces no false positives for stylistic choices, making it well-suited for integration into editors and pre-commit hooks where speed matters.

PARAMETERS

FILES

Python files to check.

CAVEATS

Only checks for errors, not style. Faster than pylint.

HISTORY

Pyflakes was created for fast static analysis of Python code.

SEE ALSO

pylint(1), flake8(1), mypy(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community