From 08214ad2b4db824c30a04534a3f139d573a92846 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frieder=20Sch=C3=BCler?= Date: Tue, 28 Apr 2026 13:29:14 +0200 Subject: [PATCH] =?UTF-8?q?eds:=20Fix=20typo=20in=20manufacturer=5Fidices?= =?UTF-8?q?=20=E2=86=92=20manufacturer=5Findices?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also use comparison instead of range() for a minor performance improvement. --- canopen/objectdictionary/eds.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/canopen/objectdictionary/eds.py b/canopen/objectdictionary/eds.py index 20cfe926..312874d5 100644 --- a/canopen/objectdictionary/eds.py +++ b/canopen/objectdictionary/eds.py @@ -496,19 +496,19 @@ def export_record(var, eds): def mandatory_indices(x): return x in {0x1000, 0x1001, 0x1018} - def manufacturer_idices(x): - return x in range(0x2000, 0x6000) + def manufacturer_indices(x): + return 0x2000 <= x < 0x6000 def optional_indices(x): return all(( x > 0x1001, not mandatory_indices(x), - not manufacturer_idices(x), + not manufacturer_indices(x), )) supported_mantatory_indices = list(filter(mandatory_indices, od)) supported_optional_indices = list(filter(optional_indices, od)) - supported_manufacturer_indices = list(filter(manufacturer_idices, od)) + supported_manufacturer_indices = list(filter(manufacturer_indices, od)) def add_list(section, list): eds.add_section(section)