@@ -219,21 +219,22 @@ def find_first_not_none(itr: List[Any]) -> Optional[Any]:
219219
220220# Generate docs/options.rst, see:
221221# https://github.com/python-sdbus/python-sdbus-networkmanager/pull/39#issuecomment-1186522147
222- def open_options_rst () -> io .TextIOWrapper :
223- options_rst = open ("docs/options.rst" , "w" )
224- options_rst .write ("Network Manager settings\n ========================\n " )
225- return options_rst
222+ def open_profile_settings_rst () -> io .TextIOWrapper :
223+ profile_settings_rst = open ("docs/profile_settings.rst" , "w" )
224+ profile_settings_rst .write ("Connection Profile Settings Helpers\n " )
225+ profile_settings_rst .write ("===================================\n \n " )
226+ return profile_settings_rst
226227
227228
228- def append_sphinx_autoclass (options_rst : io .TextIOWrapper , classname : str ) -> None :
229+ def append_sphinx_autoclass (profile_settings : io .TextIOWrapper , classname : str ) -> None :
229230 classpath = f"sdbus_async.networkmanager.settings.{ classname } "
230- options_rst .write (f"\n .. autoclass:: { classpath } \n :members:\n " )
231+ profile_settings .write (f"\n .. autoclass:: { classpath } \n :members:\n " )
231232
232233
233234# The code quality of this function is poor(Sourcery says 5%), needs refactoring,
234235# also see the rework in tools/generate-settings-dataclasses-jinja.py
235236def main (settings_xml_path : Path ) -> None :
236- options_rst = open_options_rst ()
237+ profile_settings_rst = open_profile_settings_rst ()
237238 gl_input_files = [settings_xml_path ]
238239
239240 xml_roots = [ElementTree .parse (f ).getroot () for f in gl_input_files ]
@@ -315,7 +316,7 @@ def main(settings_xml_path: Path) -> None:
315316 p .write (" )\n " )
316317 f .write ("@dataclass\n " )
317318 f .write (f"class { classname } (NetworkManagerSettingsMixin):\n " )
318- append_sphinx_autoclass (options_rst , classname )
319+ append_sphinx_autoclass (profile_settings_rst , classname )
319320
320321 # generate the docstring of the new settings_class
321322 desc = node_get_attr (settings , "description" )
0 commit comments