From 6bfd84b66be0f9a1e8b1211e03e1bde38fc5a0a6 Mon Sep 17 00:00:00 2001 From: Doug Goldstein Date: Fri, 6 Dec 2024 08:53:48 -0600 Subject: [PATCH] apply line length rules to the doc directory We've got code here and no reason it shouldn't be included in our sanity lints. Change-Id: I0d7d668bc8e2d214799f7f876a795d4af7346105 Signed-off-by: Doug Goldstein --- doc/source/_exts/web_api_docstring.py | 6 ++++-- doc/source/conf.py | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/doc/source/_exts/web_api_docstring.py b/doc/source/_exts/web_api_docstring.py index 6152b471f5..e671681271 100644 --- a/doc/source/_exts/web_api_docstring.py +++ b/doc/source/_exts/web_api_docstring.py @@ -272,7 +272,8 @@ class Parameters(Directive): for field_name in input_dict: old_field_body = input_dict[field_name] if old_field_body in yaml_data.keys(): - input_dict[field_name] = yaml_data[old_field_body]["description"] + input_dict[field_name] = \ + yaml_data[old_field_body]["description"] # Convert dictionary to bullet list format params_build_env = self.state.document.settings.env @@ -327,7 +328,8 @@ class Return(Directive): failure_detail = create_bullet_list(failure_dict, ret_build_env) ret_table_contents += failure_detail - if len(initial_list) > 0 or len(success_list) > 0 or len(proc_fail_list) > 0: + if (len(initial_list) > 0 or len(success_list) > 0 or + len(proc_fail_list) > 0): # Create a table to display the final Returns directive output ret_table = create_table('Returns', ret_table_contents) return [ret_table] diff --git a/doc/source/conf.py b/doc/source/conf.py index 0ff75f4722..2d1bb8d22d 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -121,10 +121,12 @@ master_doc = 'index' # General information about the project. copyright = 'OpenStack Foundation' -config_generator_config_file = '../../tools/config/ironic-config-generator.conf' +config_generator_config_file = \ + '../../tools/config/ironic-config-generator.conf' sample_config_basename = '_static/ironic' -policy_generator_config_file = '../../tools/policy/ironic-policy-generator.conf' +policy_generator_config_file = \ + '../../tools/policy/ironic-policy-generator.conf' sample_policy_basename = '_static/ironic' # A list of ignored prefixes for module index sorting.