Python Norminette - PEP 8 style checker with familiar 42-style output
Pyminette checks your Python code against PEP 8 style guidelines using Flake8, with an output format familiar to 42 school students.
True! But:
- ✅ Universal: Works with any editor (Vim, Emacs, nano, VS Code)
- ✅ Fast: Check multiple files instantly with
pyminette . - ✅ Portable: No IDE required, works on SSH sessions
- ✅ Scriptable: Perfect for Git hooks and CI/CD
- ✅ Familiar: Same UX as 42's Norminette
- ✅ Educational: Learn by building tools, not just using them
TL;DR: IDE linters are great for coding. Pyminette is great for validation, automation, and portability.
git clone https://github.com/tthouven/pyminette.git
pip install flake8git clone https://github.com/tthouven/pyminette.git
cd pyminette
pip install flake8
python3 pyminette.py# Check specific files (searched recursively in parent directory)
python3 pyminette.py file1.py file2.py
# Check all .py files in parent directory (auto-discovery)
python3 pyminette.pyex0/ft_hello_garden.py: OK!
ex1/ft_plot_area.py: OK!
src/bad_style.py: Error!
Error: F401 (line: 1, col: 1): 'os' imported but unused
Error: E302 (line: 5, col: 1): expected 2 blank lines, found 0
Error: E501 (line: 4, col: 80): line too long (111 > 79 characters)
- Check specific files or auto-discover all
.pyfiles - Recursive file search from parent directory (args and auto-discovery)
- Clean relative paths in output
- Norminette-style output with color-coded results
- Validates
.pyextension - Excludes itself from auto-scan
- Checks flake8 installation before running
- Python 3.10+
- Flake8
- ✅ Linux (bash/zsh/sh)
- ✅ macOS (bash/zsh)
- ✅ WSL
- ✅ No sudo required
"I'm learning to code."
This project taught me:
- Subprocess integration and system calls
- Output parsing and text processing
- CLI tool architecture
- Cross-platform compatibility
- Installation and distribution
Using tools is easy. Building them is how you learn.
PEP 8 - Style Guide for Python Code: https://peps.python.org/pep-0008/Flake8 Documentation: https://flake8.pycqa.org/Flake8 Error Codes: https://flake8.pycqa.org/en/latest/user/error-codes.htmlPython subprocess Module: https://docs.python.org/3/library/subprocess.htmlPython subprocess.run: https://docs.python.org/3/library/subprocess.html#subprocess.runArgs parsing: https://stackoverflow.com/questions/20063/whats-the-best-way-to-parse-command-line-arguments
AI was used to:
- Understand Python concepts and best practices
- Debug and troubleshoot issues
- Explore design choices and architecture decisions
This is a personal learning project, but suggestions and feedback are welcome!
MIT License - feel free to use, modify, and share.
Tristan Thouvenot - 42 Luxembourg
GitHub: tthouven (https://github.com/tthouven)
"Because why just use tools when you can build them?" 🛠️