Skip to main content

A fast Python linter written in Rust. Faster than pylint, slower than ruff. Catches more issues than ruff, less than pylint

Project description

Prylint

A blazing-fast Python linter written in Rust, providing 50-80x faster analysis compared to traditional Python linters.

Features

  • Lightning Fast: 50-80x faster than Pylint on real codebases
  • 🎯 High Accuracy: 97.8% accuracy on implemented error codes
  • 🦀 Rust-Powered: Built with Rust for maximum performance
  • 📦 Easy Installation: Simple pip install with no complex dependencies
  • 🔍 Growing Coverage: Actively expanding error detection capabilities

Installation

pip install prylint

Usage

Command Line

# Lint a single file
prylint script.py

# Lint a directory
prylint src/

# Output as JSON
prylint --json script.py

# Lint without recursion
prylint --no-recursive src/

Python API

from prylint import lint_file, lint_directory

# Lint a single file
issues = lint_file("script.py")
for issue in issues:
    print(f"{issue.file}:{issue.line}: {issue.code} {issue.message}")

# Lint a directory
issues = lint_directory("src/", recursive=True)

Supported Error Codes

Prylint currently implements 35 error codes from the Pylint error code set:

Fully Implemented (17)

  • E0001: Syntax errors
  • E0100: __init__ method is a generator
  • E0101: Explicit return in __init__
  • E0102: Function/method redefined
  • E0103: break/continue not in loop
  • E0104: Return outside function
  • E0105: Yield outside function
  • E0106: Return with argument in generator
  • E0108: Duplicate argument names
  • E0109: Duplicate dictionary keys
  • E0112: Too many starred expressions
  • E0115: Name is nonlocal and global
  • E0116: Continue not in loop
  • E0117: Nonlocal without binding
  • E0118: Used before global declaration
  • E0606: Possibly used before assignment
  • E0704: Misplaced bare raise
  • E0711: NotImplemented raised
  • E1142: await outside async

Partially Implemented (18)

Additional error codes with partial support for common cases.

Performance

Benchmark results on real Python codebases:

Linter Time Speedup
Pylint 11.2s 1x
Prylint 0.22s 50x

Why Prylint?

Prylint is designed for developers who want:

  • Fast feedback during development
  • Integration with CI/CD pipelines without slowing builds
  • A modern, performant alternative to traditional linters
  • Focus on catching real errors, not style issues

Contributing

Contributions are welcome! Please feel free to submit issues and pull requests on GitHub.

License

MIT License - see LICENSE file for details.

Roadmap

  • Expand error code coverage
  • Add configuration file support
  • Implement auto-fix capabilities
  • Add IDE integrations
  • Support for custom rules

Credits

Built with ❤️ using:

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

prylint-0.1.0.tar.gz (1.7 MB view details)

Uploaded Source

Built Distribution

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

prylint-0.1.0-py3-none-any.whl (1.7 MB view details)

Uploaded Python 3

File details

Details for the file prylint-0.1.0.tar.gz.

File metadata

  • Download URL: prylint-0.1.0.tar.gz
  • Upload date:
  • Size: 1.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.0

File hashes

Hashes for prylint-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f5aaf193628468905c44d03be1685fd6c9c588cf955234939fb79259cecc31f9
MD5 3342a5728a8fa90a020505269d483850
BLAKE2b-256 cff7cba38fa09cc0da31e47ac8dc3acb96ee7919fb3f74a6f3281931746e4c78

See more details on using hashes here.

File details

Details for the file prylint-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: prylint-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 1.7 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.0

File hashes

Hashes for prylint-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f075235c840ae873129fb0c4d3d28dce93fe67fe464e6c8e958b2eedb43ef710
MD5 a6fb1997eccde46470033338a096a6e9
BLAKE2b-256 9e51f3d06d11553489ede9c2ad2df4a38994f865af670dff17d34cef48719729

See more details on using hashes here.

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