mirror of
https://github.com/FlipsideCrypto/web3.py.git
synced 2026-02-06 10:56:47 +00:00
18 lines
340 B
Python
18 lines
340 B
Python
import functools
|
|
|
|
from eth_utils import (
|
|
compose,
|
|
)
|
|
|
|
|
|
def apply_formatters_to_return(*formatters):
|
|
formatter = compose(*formatters)
|
|
|
|
def outer(fn):
|
|
@functools.wraps(fn)
|
|
def inner(*args, **kwargs):
|
|
value = fn(*args, **kwargs)
|
|
return formatter(value)
|
|
return inner
|
|
return outer
|