From e1012e314d6c21ad1b75082a292506cd751a9117 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Thu, 2 Aug 2018 21:42:01 +0200 Subject: o Fixing a bad bug and learning some Python: list.insert(index, value) will only insert at index if the list is index long. If not it will just append them. Yay. Much better digikey part data now. Creating a ValueList that automatically expands the list. o Stopping with silly key and value replacements. o Updating tests. --- src/ee/digikey/doit.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/ee/digikey') diff --git a/src/ee/digikey/doit.py b/src/ee/digikey/doit.py index 6f7c2d5..0452530 100644 --- a/src/ee/digikey/doit.py +++ b/src/ee/digikey/doit.py @@ -142,9 +142,7 @@ def download_part_facts(output: DataSet, in_ds: DataSet): for a in product.attributes: key = "{}/{}".format(a.attribute_type.id, a.attribute_type.label) - key = key.replace("%", "_") - value = a.value.replace("%", "%%") - o.set(key, value) + o.set(key, a.value) def task_digikey_fetch_full_part_facts(): -- cgit v1.2.3