Registry / testing / flake8-json

flake8-json

JSON →
library24.4.0pypypiunverified

Flake8 plugin that formats linting results as JSON. Currently at version 24.4.0, compatible with Python >=3.6. Part of the PyCQA ecosystem. Updates follow Flake8 releases.

pip install flake8-json
INSTALL
IMPORT
SIG · FLAKE8-JSON
F
flake8-json
testingpythonv24.4.0
Install
1.5s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v24.4.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.5s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Flake8JSONFormatter
from flake8_json_reporter import Flake8JSONFormatter
from flake8_json_reporter import Flake8JSONFormatter

Run flake8 with JSON output format on a file.

import subprocess result = subprocess.run(['flake8', '--format', 'json', 'myfile.py'], capture_output=True, text=True) print(result.stdout)
Debug
Known issues
gotchaflake8-json is a formatting reporter; it does not add new lint checks. To get JSON output, use the --format json flag when invoking flake8.
fix
Run flake8 with --format json (or configure in setup.cfg).
affects: all
breakingVersions prior to 24.4.0 may have different behavior for nested violations. Always check the output schema if upgrading from an older version.
fix
Upgrade to 24.4.0 and adjust parsing if needed.
affects: <24.4.0
deprecatedUsing 'flake8-json' as a package name (hyphen) is deprecated; import using underscore: 'flake8_json'.
fix
Use 'from flake8_json import ...' instead of 'from flake8-json import ...'.
affects: >=24.4.0
Upgrade
Version history
24.4.0latest on PyPI · released Apr 20, 2024
Audit
Dependencies
flake8requiredRequired runtime dependency; flake8-json is a plugin for Flake8.
Agent activity
22 hits · last 30 days
node
22
Resources
flake8-json — pip install flake8-json · libregistry