MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / assignType

Function assignType

common/devtools/pdl.py:26–40  ·  view source on GitHub ↗
(item: dict, type: str, is_array: bool = False, map_binary_to_string: bool = False)

Source from the content-addressed store, hash-verified

24
25
26def assignType(item: dict, type: str, is_array: bool = False, map_binary_to_string: bool = False) -> None:
27 if is_array:
28 item["type"] = "array"
29 item["items"] = OrderedDict()
30 assignType(item["items"], type, False, map_binary_to_string)
31 return
32
33 if type == "enum":
34 type = "string"
35 if map_binary_to_string and type == "binary":
36 type = "string"
37 if type in primitiveTypes:
38 item["type"] = type
39 else:
40 item["$ref"] = type
41
42
43def createItem(

Callers 1

parseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected