We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 037c6b4 commit 3c3d6e0Copy full SHA for 3c3d6e0
schema_salad/makedoc.py
@@ -268,7 +268,7 @@ def typefmt(
268
tp: Any,
269
redirects: Dict[str, str],
270
nbsp: bool = False,
271
- jsonldPredicate: Optional[Dict[str, str]] = None,
+ jsonldPredicate: Optional[Union[Dict[str, str], str]] = None,
272
) -> str:
273
if isinstance(tp, MutableSequence):
274
if nbsp and len(tp) <= 3:
@@ -289,7 +289,10 @@ def typefmt(
289
ar = "array<{}>".format(
290
self.typefmt(tp["items"], redirects, nbsp=True)
291
)
292
- if jsonldPredicate is not None and "mapSubject" in jsonldPredicate:
+ if (
293
+ isinstance(jsonldPredicate, dict)
294
+ and "mapSubject" in jsonldPredicate
295
+ ):
296
if "mapPredicate" in jsonldPredicate:
297
ar += " | "
298
if len(ar) > 40:
0 commit comments