File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ def friendly(v: Any) -> Any:
9696 return f"array of <{ friendly (v .items )} >"
9797 if isinstance (v , avro .schema .PrimitiveSchema ):
9898 return v .type
99- if isinstance (v , avro .schema .UnionSchema ):
99+ if isinstance (v , ( avro .schema .UnionSchema , avro . schema . NamedUnionSchema ) ):
100100 return " or " .join ([friendly (s ) for s in v .schemas ])
101101 return avro_shortname (v )
102102
@@ -235,7 +235,7 @@ def validate_ex(
235235 f"expected list of { friendly (expected_schema .items )} "
236236 )
237237 return False
238- if isinstance (expected_schema , avro .schema .UnionSchema ):
238+ if isinstance (expected_schema , ( avro .schema .UnionSchema , avro . schema . NamedUnionSchema ) ):
239239 for s in expected_schema .schemas :
240240 if validate_ex (
241241 s ,
You can’t perform that action at this time.
0 commit comments