MCPcopy Index your code
hub / github.com/reactive-python/reactpy / _get_file_options

Function _get_file_options

docs/source/_exts/reactpy_example.py:131–145  ·  view source on GitHub ↗
(file: Path)

Source from the content-addressed store, hash-verified

129
130
131def _get_file_options(file: Path) -> list[str]:
132 options = []
133
134 for line in file.read_text().split("\n"):
135 if not line.strip():
136 continue
137 if not line.startswith("#"):
138 break
139 if not OPTION_PATTERN.match(line):
140 continue
141 option_string = line[1:].strip()
142 if option_string:
143 options.append(option_string)
144
145 return options
146
147
148def _interactive_widget(name, with_activate_button):

Callers 1

_literal_includeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected