Metadata-Version: 2.4
Name: mopper
Version: 0.1.1
Summary: A small, fast, AST-based Python linter with zero runtime dependencies.
Project-URL: Homepage, https://github.com/RohanOnKeys/mopper
Project-URL: Issues, https://github.com/RohanOnKeys/mopper/issues
Author: Rohan
License: MIT
License-File: LICENSE
Keywords: ast,cli,linter,static-analysis
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Quality Assurance
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# mopper

[![PyPI](https://img.shields.io/pypi/v/mopper)](https://pypi.org/project/mopper/)
[![Python](https://img.shields.io/pypi/pyversions/mopper)](https://pypi.org/project/mopper/)
[![License](https://img.shields.io/github/license/RohanOnKeys/mopper)](LICENSE)
[![CI](https://img.shields.io/github/actions/workflow/status/RohanOnKeys/mopper/publish.yml?label=CI)](https://github.com/RohanOnKeys/mopper/actions)

A lightweight Python linter built on the standard library's `ast` module, with **zero runtime dependencies**.

`mopper` doesn't aim to replace tools like Flake8 or Pylint. Instead, it focuses on a small set of practical checks that catch common mistakes such as unused imports, mutable default arguments, bare `except` clauses, unreachable code, and more.

## Installation

```bash
pip install mopper
```

## Usage

```bash
mopper path/to/file.py
mopper path/to/project/
mopper . --select B001,B003
mopper . --format json
```

## Rules

| Code | Check |
|------|-------|
| B001 | Unused import |
| B002 | Bare `except` clause |
| B003 | Mutable default argument |
| B004 | Comparing to `None`, `True`, or `False` with `==` instead of `is` |
| B005 | Unreachable code after `return`, `raise`, `break`, or `continue` |
| B006 | Line longer than 100 characters |

## Why mopper?

`mopper` was built from scratch to understand how Python static analysis works internally using only the standard library. It demonstrates how a practical linter can be implemented with `ast.NodeVisitor` and a simple, extensible rule system.

## License

MIT