Metadata-Version: 2.3
Name: stfu
Version: 1.3
Summary: STFU those exceptions (explicitly)
Author-email: João Bernardo Oliveira <jbvsmo@gmail.com>
License: BSD-3-Clause
Keywords: exception,silence,stfu
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.0
Classifier: Programming Language :: Python :: 3.1
Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Code Generators
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=2.6
Description-Content-Type: text/markdown

Silence chosen exceptions.
----


`stfu` is a replacement for the idiom:

```python
try:
    may_raise_exception()
except Exception:
    pass
```

Just write:

```python
with stfu:
    may_raise_exception()
```

```python
with stfu(TypeError, ValueError):
    may_raise_type_or_value_error()
```


To catch *everything* (even KeyboardInterrup and StopIteration):

```python
with stfu_all:
    may_raise_any_exception()
```

Remember to import it:

```python
from stfu import stfu
from stfu import stfu_all
```

----


> Errors should never pass silently.  
> Unless explicitly silenced.

