MCPcopy Create free account
hub / github.com/pytest-dev/pytest / main

Function main

scripts/update-plugin-list.py:119–136  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

117
118
119def main():
120 plugins = list(iter_plugins())
121
122 reference_dir = pathlib.Path("doc", "en", "reference")
123
124 plugin_list = reference_dir / "plugin_list.rst"
125 with plugin_list.open("w") as f:
126 f.write(FILE_HEAD)
127 f.write(f"This list contains {len(plugins)} plugins.\n\n")
128 f.write(".. only:: not latex\n\n")
129
130 wcwidth # reference library that must exist for tabulate to work
131 plugin_table = tabulate.tabulate(plugins, headers="keys", tablefmt="rst")
132 f.write(indent(plugin_table, " "))
133 f.write("\n\n")
134
135 f.write(".. only:: latex\n\n")
136 f.write(indent("".join(plugin_definitions(plugins)), " "))
137
138
139if __name__ == "__main__":

Callers 1

Calls 3

iter_pluginsFunction · 0.85
plugin_definitionsFunction · 0.85
writeMethod · 0.45

Tested by

no test coverage detected