Install & Compatibility
Where this runs
tested against v0.0.7 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 19.1MB
glibcpy 3.10–3.920 runs
installs and imports cleanly · install 2.0s · import 0.000s · 20MB
21MB installed
● package 21MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
is_function_pure
✓ from mr_proper.utils import is_function_pure
✗ from mr_propper.utils import is_function_pure
This quickstart demonstrates how to use `mr-proper` programmatically by parsing an AST node (a function definition) and checking its purity using `is_function_pure`. It shows both a pure and a non-pure function example.
import ast
from mr_propper.utils import is_function_pure
# Example of a pure function
func_def_pure = ast.parse('''
def add_one(n: int) -> int:
return n + 1
''').body[0]
is_pure, errors = is_function_pure(func_def_pure, with_errors=True)
print(f"'add_one' is pure: {is_pure}, Errors: {errors}")
# Example of a non-pure function
func_def_not_pure = ast.parse('''
def print_amount_of_users(users_qs: list) -> None:
print(f'Current amount of users is {len(users_qs)}')
''').body[0]
is_pure, errors = is_function_pure(func_def_not_pure, with_errors=True)
print(f"'print_amount_of_users' is pure: {is_pure}, Errors: {errors}")
mr-proper --version
Debug
Known issues
gotchaThe library is explicitly stated as 'very experimental and has a lot of edge cases'. Functions marked as pure might not be strictly pure by other definitions, though they are generally cleaner. Rely on its findings with caution.fixThoroughly review code flagged as pure and understand `mr-proper`'s specific purity criteria. Do not solely rely on the tool for correctness without human review.
affects: All versions (0.0.1 - 0.0.7)
breakingThe PyPI package name is `mr-proper` (with a hyphen), but the import statement requires `mr_propper` (with an underscore and a double 'p'). Using `import mr_proper` will result in an `ImportError`.fixAlways use `from mr_propper.utils import is_function_pure` or `import mr_propper` when importing.
affects: All versions (0.0.1 - 0.0.7)
gotchaThe command-line interface (CLI) for `mr-proper` currently does not support checking directories recursively; it only accepts individual Python file paths.fixTo check multiple files or a project, you must iterate through files yourself or integrate the programmatic API into a custom script.
affects: All versions (0.0.1 - 0.0.7)
gotchaThe project's activity has been low, with the last release in October 2021. This might imply slower responses to issues, potential unaddressed bugs, or a lack of new features.fixConsider the maintenance status when planning long-term adoption. Review the GitHub issues and pull requests to gauge current community activity and maintainer responsiveness.
affects: All versions
Upgrade
Version history
0.0.7latest on PyPI · released Oct 27, 2021
Audit
Dependencies
No dependency data recorded yet.