Metadata-Version: 2.4
Name: nullwise
Version: 0.3.1
Summary: Precise, actionable explanations for NoneType attribute errors
Author: ZUHAYR
Project-URL: Homepage, https://github.com/ZUHAYR-A/nullwise
Keywords: debugging,error-handling,exceptions
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Development Status :: 3 - Alpha
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Dynamic: license-file

# nullwise

Precise, actionable explanations for NoneType attribute errors — plus a
suggested fix based on common causes.

## Install

    pip install nullwise

## Usage — decorator (recommended)

Catches the error even if your code has broader try/except blocks around it,
and always re-raises so you never lose the real exception.

    from nullwise import traced

    @traced
    def get_user_email(user_id):
        user = db.find_user(user_id)  # returns None if not found
        return user.email

## Usage — global hook

Catches any *fully unhandled* crash anywhere in your program automatically.

    import nullwise
    nullwise.enable()

## What it catches

Validated against real-world patterns including:
- Functions that return None implicitly
- dict.get() returning None for missing keys
- Regex functions (re.search, re.match) returning no match
- Failed file/API loads that return None
- In-place list methods (sort, append, etc.) that return None

## What it doesn't catch

nullwise is scoped specifically to `AttributeError`. Errors like
`TypeError: 'NoneType' object is not subscriptable` (e.g. `None["key"]`)
are a different error class and are not currently covered.
