# Sloppylint – A linter for AI-generated Python code

AI coding assistants are productive but sloppy. They produce code that looks right but: - Imports packages that don't exist - Uses placeholder functions that do nothing - Leaks patterns from JavaScript, Java, Ruby into Python - Leaves behind dead code and duplicates - Uses mutable default arguments…

- **Page:** https://magpie.gallery/i/sloppylint-a-linter-for-ai-generated-python-code-dk91
- **Type:** Link to an idea elsewhere
- **Category:** AI & dev
- **Tags:** linter, python, ai-code, static-analysis, cli

## Source

Web · kyub: Sloppylint – A linter for AI-generated Python code

- **Original:** https://news.ycombinator.com/item?id=46167703

> AI coding assistants are productive but sloppy. They produce code that looks right but: - Imports packages that don't exist - Uses placeholder functions that do nothing - Leaks patterns from JavaScript, Java, Ruby into Python - Leaves behind dead code and duplicates - Uses mutable default arguments I built sloppylint to catch these "AI slop" patterns before they hit production. pip install sloppylint sloppylint . It detects 100+ patterns across categories: - Hallucinated imports (20% of AI imports reference non-existent packages) - Placeholder code (`pass`, `...`, `TODO`) - Wrong-language patterns (.push(), .equals(), .forEach()) - Mutable defaults, bare excepts, dead code This isn't a replacement for traditional linters - it catches the specific mistakes AI makes that humans wouldn't. https://github.com/rsionnach/sloppylint https://github.com/rsionnach/sloppylint

## GitHub projects

- https://github.com/rsionnach/sloppylint

## Rules for reuse

- Build your own version: don't copy another product's code, look, icons, colours or copy.
- The original belongs to its author; Magpie only links to it.
- The original content's copyright belongs to its creator. Magpie doesn't download or re-upload it; we only show the link and the official preview.
