Skip to content

Detect AI-generated code patterns via static analysis (mypy + flake8 plugins)

License

Notifications You must be signed in to change notification settings

HardMax71/no-slop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

no-slop

Detect AI-generated code patterns via static analysis

Python 3.10+ mypy flake8
CI codecov PyPI
License: MIT

Note

Why mypy/flake8? Ruff and ty don't support external plugins (ruff#283, ty blog).

Install

pip install no-slop

Usage

mypy plugin (redundant type checks):

# pyproject.toml
[tool.mypy]
plugins = ["no_slop.mypy_plugin"]

flake8 plugin (style checks) - auto-registers on install:

flake8 your_project/

Unused defaults CLI:

no-slop-unused-defaults /path/to/project

What it detects

  • Redundant isinstance/hasattr/getattr/callable when types guarantee the result
  • Runtime checks on Any/untyped values (add types instead)
  • ASCII art, emojis, excessive docstrings
  • Default parameters never used by any call site

See docs.md for full documentation.