Metadata-Version: 2.1
Name: tinyerr
Version: 0.0.1a1
Summary: Tiny Errors that remove the clutter
License: MIT License
        
        Copyright (c) 2023 James Finnie-Ansley
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: repository, https://github.com/James-Ansley/tinyerr
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE

# TinyErr

TinyErr (pronounced tinier) provides tiny errors that get straight to the point.

> Project is still in early Alpha – significant changes are expected and
> features are limited

## Install

```
pip install tinyerr
```

> While TinyErr is in alpha, it may be best to install directly from GitHub for
> the latest changes:
> ```
> pip install git+https://github.com/James-Ansley/tinyerr.git
> ```

## Example

`main.py`:

```python
def foo(x, y):
    return bar(x, y)


def bar(x, y):
    return x + y


result = foo(5, "Hello")
print(result)
```

Running `tinyerr main.py` produces:

```text
File "main.py", line 9, in <module>

    result = foo(5, "Hello")
             ^^^^^^^^^^^^^^^

File "main.py", line 2, in foo

    return bar(x, y)
           ^^^^^^^^^

File "main.py", line 6, in bar

    return x + y
           ~~^~~

TypeError: cannot do `<int> + <str>`
```

By default, the traceback limit is set to 0 (the entire stack). This can be
configured with the `-tb` or `--traceback` command line option.
e.g. `tinyerr -tb 1 main.py` will yield:

```text
File "main.py", line 6, in bar

    return x + y
           ~~^~~

TypeError: cannot do `<int> + <str>`
```
