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

Method generate_decl

py/generate.py:263–271  ·  view source on GitHub ↗

Generate the code that declares this property.

(self)

Source from the content-addressed store, hash-verified

261 )
262
263 def generate_decl(self):
264 """Generate the code that declares this property."""
265 code = inline_doc(self.description)
266 if code:
267 code += "\n"
268 code += f"{self.py_name}: {self.py_annotation}"
269 if self.optional:
270 code += " = None"
271 return code
272
273 def generate_to_json(self, dict_, use_self=True):
274 """Generate the code that exports this property to the specified JSON dict."""

Callers 2

generate_class_codeMethod · 0.45
generate_codeMethod · 0.45

Calls 1

inline_docFunction · 0.85

Tested by

no test coverage detected