Automatic Flake8 fixer for Python projects
Project description
fix8
Version: 0.1.0
fix8 is an automated tool designed to detect and fix common Flake8 / PEP8 style issues in Python projects. It automatically handles spacing, trailing whitespace, blank lines, and other common formatting problems.
Features
- Automated Correction: Detects and fixes common Python style issues without manual intervention.
- Recursive Support: Works on multiple files or entire directories recursively.
- Efficiency: Handles multiple errors on the same line.
- CLI Ready: Simple Command Line Interface for quick usage in projects or CI/CD pipelines.
How it Works
The fix8 workflow follows a persistent correction cycle:
- Scan: Runs
flake8on the target file(s) or directory. - Detect: Identifies errors that match the built-in rule set.
- Patch: Generates specific patches to fix the errors automatically.
- Loop: Applies patches in a loop until no known errors remain.
Installation
Via Pip
pip install fixer8
Usage
fix8 is flexible and can be pointed at specific files or full project structures.
Fix a single file:
fix8 path/to/file.py
Fix multiple files:
Bash
fix8 file1.py file2.py or fix8 .
Mix files and directories:
fix8 file1.py src/ tests/
Supported Rules
The following rules are currently supported for automated fixing:
- E225,Missing whitespace around operator,add
- E226,Missing whitespace around arithmetic operator,add
- E227,Missing whitespace around bitwise or shift operator,add
- E228,Missing whitespace around modulo operator,add
- E301,Expected 1 blank line before function/class,add_line
- E302,Expected 2 blank lines before top-level function,add_line
- E303,Too many blank lines,delete_line
- W291,Trailing whitespace,delete
- W292,No newline at end of file,add
- W293,Blank line contains whitespace,delete
- W391,Blank line at end of file,delete
- E111,Indentation is not a multiple of four,fix
- E114,Indentation is not a multiple of four (closing bracket),fix
- E701,Multiple statements on one line (simple split),add_newline
- E702,Multiple statements on one line (split by newline),add_newline
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fixer8-0.1.1.tar.gz.
File metadata
- Download URL: fixer8-0.1.1.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9fff4be9a2aff31c678b06a5ebdee54794229ac5f3f9a64aef3ae4c0a9e58940
|
|
| MD5 |
904e41186ee90d2687bbdf5d5eb17c8a
|
|
| BLAKE2b-256 |
f8b0b79cc294f99579b53d28ad195442f0504046bff46c8ecc93e39613dcf109
|
File details
Details for the file fixer8-0.1.1-py3-none-any.whl.
File metadata
- Download URL: fixer8-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a837d57a6f9c77564e6603d12a74a9cf989b7dc77ca2b433d9c8bb3e4b7528da
|
|
| MD5 |
a1ddc5e269f89fc75835f511ce03b718
|
|
| BLAKE2b-256 |
bffd93e776287e39383b97b3229254df9469aa4fcd3856ce6b11b4984abca947
|