From 0bcafe14f11a1e29e0ca6a482198cec55e533334 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 29 Mar 2025 11:51:04 +1100 Subject: [PATCH] Cleanup: resolve/suppress pylint warnings --- tools/utils_doc/code_layout_diagram.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/utils_doc/code_layout_diagram.py b/tools/utils_doc/code_layout_diagram.py index 34f4cb3a211..f82a6800b3a 100644 --- a/tools/utils_doc/code_layout_diagram.py +++ b/tools/utils_doc/code_layout_diagram.py @@ -392,7 +392,7 @@ def _function_id() -> str: ''' Create a string naming the function n frames up on the stack. ''' - import sys + # pylint: disable-next=protected-access co = sys._getframe(1).f_code return '{:s}:{:d}:'.format(co.co_name, co.co_firstlineno) @@ -851,7 +851,7 @@ def draw_legend(scene, *, step_y, legend_data, text): ) # Draw text. - box_dir, box_dir_ob = draw_text_left( + box_dir, _box_dir_ob = draw_text_left( scene, # First get the bounds. location=(x_left + 0.25, step_y - 0.175), @@ -1010,10 +1010,10 @@ def validate_sections(): if "{platform}" in source_code_base: source_code_base = source_code_base.replace("{platform}", this_platform) - dirs_fs = set([ + dirs_fs = { e.name for e in os.scandir(os.path.join(ROOT_DIR, source_code_base)) if e.is_dir() - ]) + } for section in sections: for dir_docs, _ in section.source_code_dirs: