fixed linter errors and ambigious variable names

This commit is contained in:
2025-11-06 17:37:02 +01:00
parent 96258c47ab
commit dbdd7b4540
9 changed files with 13 additions and 33 deletions

View File

@@ -70,7 +70,7 @@ def get_major_ticks(dim):
def get_major_dticks(axis):
ticks = getattr(axis, 'get_{}ticks'.format(dim))()
scale = getattr(axis, 'get_{}scale'.format(dim))()
if scale is 'log':
if scale == 'log':
value = (ticks[1:] / ticks[:-1]).mean()
else:
value = (ticks[1:] - ticks[:-1]).mean()
@@ -406,7 +406,7 @@ def export_to_agr(figure, filename, **kwargs):
for i, color in enumerate(ValueAttribute.attr_lists['color']):
# print(i, color)
if color is not 'none':
if color != 'none':
rgba, = cc.to_rgba_array(color)
rgb_tuple = tuple(int(255 * c) for c in rgba[:3])
color_name = tudcol_rev.get(tuple(rgba), color)