Skip to content

Commit

Permalink
simplify typing
Browse files Browse the repository at this point in the history
  • Loading branch information
hanouticelina committed Feb 18, 2025
1 parent 2df7249 commit 5b2546a
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/huggingface_hub/utils/_xet.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
from dataclasses import dataclass
from typing import Dict, Optional, Union

from requests.structures import CaseInsensitiveDict
from typing import Dict, Optional

from .. import constants
from . import get_session, validate_hf_hub_args
Expand All @@ -16,9 +14,7 @@ class XetMetadata:
file_hash: Optional[str] = None


def parse_xet_headers(
headers: Union[Dict[str, str], CaseInsensitiveDict[str]],
) -> Optional[XetMetadata]:
def parse_xet_headers(headers: Dict[str, str]) -> Optional[XetMetadata]:
"""
Parse XET metadata from the HTTP headers or return None if not found.
Expand Down

0 comments on commit 5b2546a

Please sign in to comment.