--- id: mr-proper version: "0.0.7" license: MIT license_treatment: permissive maintenance: abandoned --- # mr-proper — Static Python code analyzer, that tries to check if functions in code are pure or not and why. License: permissive · Maintenance: abandoned · Downloads: 360.1K/mo ## 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 above — verify before relying. mr. Proper is a static code analyzer that examines Python functions to determine whether they are pure—free from side effects, global state mutations, and forbidden operations—and reports why they fail purity checks. 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 pip install mr-proper uv add mr-proper poetry add mr-proper ## Installing mr-proper 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. 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) Functions must be fully type-annotated; no dynamic calls supported. 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: unspecified - Install friction: low - Maintenance: abandoned - Downloads: 360.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags static code analyzer python, pure function checker, code quality analysis, function purity detection, side effect detection, python code linter, ast analysis tool, static-analysis, abandoned [View on SkillFed](https://skillfed.io/packages/mr-proper) · [View on PyPI](https://pypi.org/project/mr-proper/)