Pyinline
A function inliner for Python. Import inline from pyinline and run:
$ python -m pyinline source.py
This will convert the following:
from pyinline import inline
import logging
log = logging.getLogger(__name__)
@inline
def log_error(msg: str, exception: Exception):
log.error(msg, exception, exc_info=True)
try:
x = 1 / 0
except Exception as e:
log_error("Could not divide number", e)
will generate:
import logging
log = logging.getLogger(__name__)
try:
x = 1 / 0
except Exception as e:
log.error("Could not divide number", e, exc_info=True)
Call with --diff to generate a patch.
Metadata
Release files for pyinline 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyinline-0.0.2.tar.gz | 4.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyinline-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.5 kB
Release files / pyinline-0.0.2.tar.gz
| Download URL | pyinline-0.0.2.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9099d53ba03f6375fd80e7f7107ae4b99b9b32bec5fbd43ebe517cd71d0568ce
|
|
BLAKE2b-256 checksum How to use checksums |
f4b20cf83fb2f113cda0d785fcc5b37b302a812a77303487faa1ce047c65233c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.26.0
|
Release files / pyinline-0.0.2-py3-none-any.whl
| Download URL | pyinline-0.0.2-py3-none-any.whl |
|---|---|
| Size | 4.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dc2afa7602bdf97482535214b86c96df610bbd16df37839ebde672faa88e08eb
|
|
BLAKE2b-256 checksum How to use checksums |
d2c1b0fb2064f5a9dea1f94fe6ec33f71148bfd9f654f7467111822fb57e557c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.26.0
|