@@ -392,7 +392,7 @@ def avro_name(url): # type: (AnyStr) -> AnyStr
392392 return url
393393
394394
395- Avro = TypeVar ('Avro' , Dict [six . text_type , Any ], List [Any ], six . text_type )
395+ Avro = TypeVar ('Avro' , Dict [Text , Any ], List [Any ], Text )
396396
397397
398398def make_valid_avro (items , # type: Avro
@@ -416,7 +416,7 @@ def make_valid_avro(items, # type: Avro
416416 "Named schemas must have a non-empty name: %s" % items )
417417
418418 if items ["name" ] in found :
419- return cast (six . text_type , items ["name" ])
419+ return cast (Text , items ["name" ])
420420 else :
421421 found .add (items ["name" ])
422422 for n in ("type" , "items" , "values" , "fields" ):
@@ -431,7 +431,7 @@ def make_valid_avro(items, # type: Avro
431431 for i in items :
432432 ret .append (make_valid_avro (i , alltypes , found , union = union )) # type: ignore
433433 return ret
434- if union and isinstance (items , ( str , six .text_type ) ):
434+ if union and isinstance (items , six .string_types ):
435435 if items in alltypes and avro_name (items ) not in found :
436436 return cast (Dict , make_valid_avro (alltypes [items ], alltypes , found ,
437437 union = union ))
0 commit comments