pyscn

A code quality analyzer for Python that looks at complexity, duplicated code, dead code and dependencies. It aims to keep AI-generated code maintainable.

Share on XLicense: MIT

Overview

pyscn is a code quality analyzer for Python, built with Go and tree-sitter. With one command it scores a whole codebase from 0 to 100 with an A to F grade and produces an HTML report showing what to fix first. It examines dead code, duplicated code, complexity, module and directory hotspots, architecture issues such as circular imports and layer violations, and class design. It is aimed at keeping code written with AI tools maintainable, and can run through uvx or pipx.

Key features

  • Dead code and duplicate code detection
  • Cyclomatic and cognitive complexity checks
  • Architecture checks for circular imports and layer rule violations
  • Class design metrics such as coupling and cohesion

Best for

Useful for Python developers who use AI coding tools and want a quick structural health check with a prioritized report.

Upstream
ludo-technologies/pyscn
Fork on GitHub
Guo-astro/pyscn
Upstream stars
1.1k
Category
Developer tools and infrastructure
Language
Go
License
MIT
Forked
2025-10-13
Sync status
In syncLast synced 2026-09-29