feat: remove load_dotenv() in feature_decorator.py

PiperOrigin-RevId: 794249376
This commit is contained in:
Google Team Member
2025-08-12 13:35:49 -07:00
committed by Copybara-Service
parent 5fba1963c3
commit 10e3dfab1a
@@ -23,8 +23,6 @@ from typing import TypeVar
from typing import Union
import warnings
from dotenv import load_dotenv
T = TypeVar("T", bound=Union[Callable, type])
@@ -67,9 +65,6 @@ def _create_decorator(
@functools.wraps(orig_init)
def new_init(self, *args, **kwargs):
# Load .env file if dotenv is available
load_dotenv()
# Check if usage should be bypassed via environment variable at call time
should_bypass = (
bypass_env_var is not None
@@ -92,9 +87,6 @@ def _create_decorator(
@functools.wraps(obj)
def wrapper(*args, **kwargs):
# Load .env file if dotenv is available
load_dotenv()
# Check if usage should be bypassed via environment variable at call time
should_bypass = (
bypass_env_var is not None