Skip to content

Latest commit

 

History

History
55 lines (40 loc) · 1.73 KB

File metadata and controls

55 lines (40 loc) · 1.73 KB

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.