fix(utils): remove unnecessary Type fallback and keep explicit typing import

This commit is contained in:
KaifAhmad1
2026-03-03 17:18:20 +05:30
parent 49582ad89a
commit 436bcc5352
+1 -8
View File
@@ -65,14 +65,7 @@ import os
import re
from datetime import datetime, timezone
from pathlib import Path
from typing import Any, Dict, List, Optional, Tuple, Union
# Defensive fallback: keep `Type` defined for environments or refactors
# where typing imports may drift and runtime annotations still reference it.
try:
from typing import Type
except Exception: # pragma: no cover
Type = type
from typing import Any, Dict, List, Optional, Tuple, Type, Union
def format_data(data: Any, format_type: str = "json") -> str: