Skip to content

Commit 84139c7

Browse files
committed
typing: "Avro" is better as a type alias than a TypeVar
1 parent 51b590e commit 84139c7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

schema_salad/schema.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import copy
44
import hashlib
55
from collections.abc import Mapping, MutableMapping, MutableSequence
6-
from typing import IO, Any, Optional, TypeVar, Union, cast
6+
from typing import IO, Any, Optional, Union, cast
77
from urllib.parse import urlparse
88

99
from ruamel.yaml.comments import CommentedMap, CommentedSeq
@@ -506,7 +506,7 @@ def avro_field_name(url: str) -> str:
506506
return d.path.split("/")[-1]
507507

508508

509-
Avro = TypeVar("Avro", MutableMapping[str, Any], MutableSequence[Any], str)
509+
Avro = Union[MutableMapping[str, Any], MutableSequence[Any], str]
510510

511511

512512
def make_valid_avro(

0 commit comments

Comments
 (0)