Registry / testing / grunt-flake8

grunt-flake8

JSON →
library0.1.3jsnpmunverified

A Grunt plugin to lint Python projects using flake8, which combines PyFlakes, PEP8, and McCabe's cyclomatic complexity checks. Version 0.1.3, last released in 2014, with no active development. It wraps flake8 as a Grunt task, allowing project-level configuration overrides. Alternatives include direct flake8 invocation or other Python linters.

npm install grunt-flake8
INSTALL
IMPORT
SIG · GRUNT-FLAKE8
G
grunt-flake8
testingjavascriptv0.1.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

flake8 task
grunt.loadNpmTasks('grunt-flake8'); grunt.initConfig({ flake8: { src: ['**/*.py'] } });
require('grunt-flake8')
Not a Node module to import; loaded as Grunt task.

Configures a flake8 Grunt task to lint Python files with custom options.

// Install: npm install grunt-flake8 --save-dev // Gruntfile.js module.exports = function(grunt) { grunt.initConfig({ flake8: { options: { errorsOnly: false, force: false, maxComplexity: 10, maxLineLength: 100, ignore: ['E501'] }, src: ['src/**/*.py', 'test/**/*.py'] } }); grunt.loadNpmTasks('grunt-flake8'); grunt.registerTask('default', ['flake8']); };
Debug
Known issues
deprecatedPackage has not been updated since 2014; unmaintained.
fix
Use direct flake8 invocation or switch to modern Python linting tools.
affects: >=0.1.0
gotchaGrunt must be run from within the Python virtual environment where flake8 is installed.
fix
Activate the virtual environment before running grunt.
affects: >=0.1.0
gotchaOptions set in Gruntfile override global/project flake8 configurations; some options may be dropped silently.
fix
Check flake8 documentation for supported options and test with --verbose.
affects: >=0.1.0
Errors
Common errors & fixes
Warning: Task "flake8" not found. Use --force to continue.
grunt.loadNpmTasks('grunt-flake8') missing or package not installed.
fix
Ensure grunt-flake8 is installed and run npm install grunt-flake8 --save-dev, then add grunt.loadNpmTasks('grunt-flake8') to Gruntfile.
Fatal error: flake8 command not found
flake8 not installed in current Python environment.
fix
Install flake8 via pip: pip install flake8, and ensure the virtual environment is activated.
Running "flake8:src" (flake8) task Warning: Task "flake8:src" failed. Use --force to continue.
Linting errors found and options.force is false.
fix
Set options.force: true to continue despite errors, or fix the lint issues.
Upgrade
Version history
0.1.3latest on npm
Audit
Dependencies
gruntrequiredpeer dependency: required as Grunt plugin
Agent activity
10 hits · last 30 days
node
10
Resources
grunt-flake8 — npm install grunt-flake8 · libregistry