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

Function _wire_args

py/generate_bidi_protocol.py:887–907  ·  view source on GitHub ↗
(f: FieldIR)

Source from the content-addressed store, hash-verified

885
886
887def _wire_args(f: FieldIR) -> list[str]:
888 args = [lit(f.wire)]
889 if f.required:
890 args.append("required=True")
891 if f.nullable:
892 args.append("nullable=True")
893 if f.ref:
894 args.append(f"ref={lit(f.ref)}")
895 if f.is_list:
896 args.append("is_list=True")
897 if f.enum:
898 args.append(f"enum={lit(f.enum)}")
899 if f.primitive:
900 args.append(f"primitive={lit(f.primitive)}")
901 if f.scalar:
902 value = f"[{', '.join(lit(s) for s in f.scalar)}]" if isinstance(f.scalar, list) else lit(f.scalar)
903 args.append(f"scalar={value}")
904 if f.fixed is not _NO_FIXED:
905 args.append(f"fixed={lit(f.fixed)}")
906 args += [f"{camel_to_snake(key)}={lit(value)}" for key, value in f.bounds.items()]
907 return args
908
909
910def _emit_field(f: FieldIR, optional_default: bool) -> str:

Callers 1

_emit_fieldFunction · 0.85

Calls 4

camel_to_snakeFunction · 0.85
itemsMethod · 0.80
litFunction · 0.70
appendMethod · 0.45

Tested by

no test coverage detected