mr-proper
Static Python code analyzer, that tries to check if functions in code are pure or not and why.
Decision gist · record as of 2026-08-14
No, unless you are maintaining legacy code that already uses it. The project is archived and unmaintained since 2021, with no bug fixes or Python version updates forthcoming. The purity heuristics are experimental and produce false positives. For new projects, consider actively maintained alternatives instead.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Functions must be fully type-annotated; no dynamic calls supported.
- Low install friction with four lightweight runtime dependencies.
- However, the project is archived and abandoned since 2021, so maintenance and bug fixes are not expected.
License · maintenance · safety
MIT (permissive) — MIT license permits free use, modification, and distribution with minimal restrictions, making it safe to use in most projects without legal concern.
last release 2021-10-27 (1752 days) · last repo commit 2026-04-13 · 19 stars · archived
0 known vulnerabilities (OSV.dev, 2026-08-14) · 360,139 downloads/mo, #7,246 on PyPI
Alternatives
Verify before relying
pip install mr_proper
import ast
from mr_proper.utils import is_function_pure
funcdef = ast.parse('def add_one(n: int) -> int:\n return n + 1').body[0]
is_function_pure(funcdef)- How accurately the purity heuristics identify truly pure functions in practice, given the disclaimer about edge cases and false positives.
- Whether the tool remains compatible with Python versions beyond 3.9 despite being last released in 2021.
What it is and what it does
mr. Proper analyzes Python function definitions via AST inspection to assess whether they conform to a set of purity heuristics: no blacklisted calls (like print), no global state access, no argument mutation, no local imports, no forbidden argument types (like ORM objects), and only calls to other pure functions. It provides both a CLI tool and a programmatic API (is_function_pure) to report violations.
The tool is explicitly experimental and acknowledges edge cases—functions marked pure may not actually be pure, but the analysis tends to identify cleaner code. It requires fully type-annotated functions and no dynamic calls. With an abandoned status since 2021 and no active maintenance, it is suitable only for exploratory code quality checks or legacy codebases where the tool was already integrated.
Use it for
- Audit existing Python codebases to identify which functions have no side effects and could be refactored for testability.
- Enforce functional programming patterns in a team by checking that utility functions remain pure during code review.
- Detect accidental use of global state or ORM objects in functions intended to be pure calculations.
- Analyze legacy code to find candidates for memoization or parallelization based on purity guarantees.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
No, unless you are maintaining legacy code that already uses it.
The project is archived and unmaintained since 2021, with no bug fixes or Python version updates forthcoming. The purity heuristics are experimental and produce false positives. For new projects, consider actively maintained alternatives instead.
Install
mr-proper on PyPI
Before you install
Low install friction with four lightweight runtime dependencies. However, the project is archived and abandoned since 2021, so maintenance and bug fixes are not expected.
Functions must be fully type-annotated; no dynamic calls supported.
License in practice
MIT license permits free use, modification, and distribution with minimal restrictions, making it safe to use in most projects without legal concern.
Quickstart
pip install mr_proper
import ast
from mr_proper.utils import is_function_pure
funcdef = ast.parse('def add_one(n: int) -> int:\n return n + 1').body[0]
is_function_pure(funcdef)
Verify before relying
- How accurately the purity heuristics identify truly pure functions in practice, given the disclaimer about edge cases and false positives.
- Whether the tool remains compatible with Python versions beyond 3.9 despite being last released in 2021.
Package facts
| License | MIT permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 4 packagesclicksetuptoolsstdlib-listtyping-extensions |
| Maintenance | Abandoned 1,752 days since the last release |
| Last repo commit | repository archived |
| First released | |
| Downloads | 360,139 / month, #7,246 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 3 - AlphaEnvironment :: ConsoleOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python Modules |
Evidence: mr_proper-0.0.7-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “pure function checker”
- mr-propermr. Proper is a static code analyzer that examines Python functions…
- flake8-functionsA flake8 extension that enforces function-level code quality rules:…
- pyspark-testProvides a testing utility to assert equality between two PySpark…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also flawfinder · flake8-functions · uncalled · lizard · beniget · cpplint · purify · reorder-python-imports · ast-decompiler · luaparser