pyinline, a script for inlining functions that have been decorated with the `@inline` decorator.
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyinline-0.0.2.tar.gz
(4.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyinline-0.0.2.tar.gz.
File metadata
- Download URL: pyinline-0.0.2.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.26.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9099d53ba03f6375fd80e7f7107ae4b99b9b32bec5fbd43ebe517cd71d0568ce
|
|
| MD5 |
124210d373d52232199ce5002e2eb0d8
|
|
| BLAKE2b-256 |
f4b20cf83fb2f113cda0d785fcc5b37b302a812a77303487faa1ce047c65233c
|
File details
Details for the file pyinline-0.0.2-py3-none-any.whl.
File metadata
- Download URL: pyinline-0.0.2-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.26.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc2afa7602bdf97482535214b86c96df610bbd16df37839ebde672faa88e08eb
|
|
| MD5 |
3cf922506a65289f1b803dad8c1d12e8
|
|
| BLAKE2b-256 |
d2c1b0fb2064f5a9dea1f94fe6ec33f71148bfd9f654f7467111822fb57e557c
|