Skip to main content

Detect AI-generated code patterns via static analysis

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

no_slop-0.4.0.tar.gz (31.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

no_slop-0.4.0-py3-none-any.whl (29.4 kB view details)

Uploaded Python 3

File details

Details for the file no_slop-0.4.0.tar.gz.

File metadata

  • Download URL: no_slop-0.4.0.tar.gz
  • Upload date:
  • Size: 31.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for no_slop-0.4.0.tar.gz
Algorithm Hash digest
SHA256 cc20d47e96e27084494361a5f5df3e5e3f35486d64e8065d987265e4def331a3
MD5 e914e2f839aaa5cb583a0544d490598f
BLAKE2b-256 419a422055ab856a210e85d45925b0ccf76efd3ceef166b6c1dbd4de616ddf7b

See more details on using hashes here.

Provenance

The following attestation bundles were made for no_slop-0.4.0.tar.gz:

Publisher: release.yml on HardMax71/no-slop

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file no_slop-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: no_slop-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 29.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for no_slop-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ea223e676270e59a9cd5150a3fa004b0e5e6369aead807a49bd3d34efdd45959
MD5 8b388009bc9bb6d03ecd490a55efa3c5
BLAKE2b-256 83fbfb4698f77b2bd24f960cc1fd980e9b41417aa705c72ff2975dd7f49fe980

See more details on using hashes here.

Provenance

The following attestation bundles were made for no_slop-0.4.0-py3-none-any.whl:

Publisher: release.yml on HardMax71/no-slop

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page