@@ -392,7 +392,7 @@ def avro_name(url): # type: (AnyStr) -> AnyStr
392
392
return url
393
393
394
394
395
- Avro = TypeVar ('Avro' , Dict [six . text_type , Any ], List [Any ], six . text_type )
395
+ Avro = TypeVar ('Avro' , Dict [Text , Any ], List [Any ], Text )
396
396
397
397
398
398
def make_valid_avro (items , # type: Avro
@@ -416,7 +416,7 @@ def make_valid_avro(items, # type: Avro
416
416
"Named schemas must have a non-empty name: %s" % items )
417
417
418
418
if items ["name" ] in found :
419
- return cast (six . text_type , items ["name" ])
419
+ return cast (Text , items ["name" ])
420
420
else :
421
421
found .add (items ["name" ])
422
422
for n in ("type" , "items" , "values" , "fields" ):
@@ -431,7 +431,7 @@ def make_valid_avro(items, # type: Avro
431
431
for i in items :
432
432
ret .append (make_valid_avro (i , alltypes , found , union = union )) # type: ignore
433
433
return ret
434
- if union and isinstance (items , ( str , six .text_type ) ):
434
+ if union and isinstance (items , six .string_types ):
435
435
if items in alltypes and avro_name (items ) not in found :
436
436
return cast (Dict , make_valid_avro (alltypes [items ], alltypes , found ,
437
437
union = union ))
0 commit comments