Cleanup: resolve/suppress pylint warnings

This commit is contained in:
Campbell Barton
2025-03-29 11:51:04 +11:00
parent 12e3a046a5
commit 0bcafe14f1

View File

@@ -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: