Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions eth_utils/decorators.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import functools
import itertools
import os
from typing import (
Any,
Callable,
Expand Down Expand Up @@ -75,6 +76,8 @@ def validate_conversion_arguments(to_wrap: Callable[..., T]) -> Callable[..., T]
- Kwarg must be 'primitive' 'hexstr' or 'text'
- If it is 'hexstr' or 'text' that it is a text type
"""
if os.environ.get("ETH_UTILS_NOVALIDATE"):
return to_wrap

@functools.wraps(to_wrap)
def wrapper(*args: Any, **kwargs: Any) -> T:
Expand Down
3 changes: 3 additions & 0 deletions newsfragments/304.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
add ETH_UTILS_NOVALIDATE env var for optimized production deployments

this env will instruct eth-utils to skip some extra steps that validate its functions are being used correctly, to be used when you're already sure this is true