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

Method get_constructor

py/generate.py:188–193  ·  view source on GitHub ↗

Return the code to construct a value for a given CDP type.

(cls, cdp_type, val)

Source from the content-addressed store, hash-verified

186
187 @classmethod
188 def get_constructor(cls, cdp_type, val):
189 """Return the code to construct a value for a given CDP type."""
190 if cdp_type == "any":
191 return val
192 cons = cls[cdp_type].value
193 return f"{cons}({val})"
194
195
196@dataclass

Callers 1

generate_from_jsonMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected