Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pyscn-pre-commit

A pre-commit hook for pyscn, an intelligent Python code quality analyzer.

This is a mirror repository. It holds no source of its own: it installs pyscn from PyPI so that pre-commit does not have to clone the main repository, which carries the Go implementation. The mirror follows PyPI automatically, so every pyscn release gets a matching tag here within a few hours.

Usage

Add this to your .pre-commit-config.yaml:

repos:
  - repo: https://github.com/ludo-technologies/pyscn-pre-commit
    rev: v1.31.3
    hooks:
      - id: pyscn

Then:

$ pre-commit install
$ pre-commit run pyscn --all-files

The hook runs pyscn check, which analyses the whole project and fails the commit on complexity, dead code, circular dependency, and parse issues. Configure thresholds through .pyscn.toml or [tool.pyscn] in pyproject.toml as usual; see the pyscn documentation.

To pass extra flags, use args:

      - id: pyscn
        args: [--select, complexity, --max-complexity, "15"]

The hook also works with prek.

Platform support

pyscn ships prebuilt wheels for Linux x86_64 and arm64, macOS arm64, and Windows x86_64. There is no source distribution, so the hook cannot be installed on platforms without a wheel. Use brew install pyscn or go install on those.

License

MIT, matching pyscn.

About

pre-commit hook mirror for pyscn

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages