aboutsummaryrefslogtreecommitdiff
path: root/src/ee/part
diff options
context:
space:
mode:
Diffstat (limited to 'src/ee/part')
-rw-r--r--src/ee/part/__init__.py3
-rw-r--r--src/ee/part/common_fact_types.py4
-rw-r--r--src/ee/part/fact_keys.py1
3 files changed, 7 insertions, 1 deletions
diff --git a/src/ee/part/__init__.py b/src/ee/part/__init__.py
index a2face8..3ce255e 100644
--- a/src/ee/part/__init__.py
+++ b/src/ee/part/__init__.py
@@ -375,6 +375,9 @@ class Facts(object):
k = self._get_key(key)
return next((f.valueProp for f in self.part.get_facts() if f.keyProp == k), None)
+ def get_values(self, *keys: Union[str, FactType]) -> List[Optional[str]]:
+ return [self.get_value(key) for key in keys]
+
class Entry(object):
def __init__(self, new: bool, part: types.Part):
diff --git a/src/ee/part/common_fact_types.py b/src/ee/part/common_fact_types.py
index 12c099e..10ba1eb 100644
--- a/src/ee/part/common_fact_types.py
+++ b/src/ee/part/common_fact_types.py
@@ -1,5 +1,7 @@
import ee
-from ee.part import EeValueFactType, fact_keys
+from ee.part import EeValueFactType, fact_keys, FactType
+
+footprint = FactType(fact_keys.footprint, "Footprint")
resistance = EeValueFactType(fact_keys.resistance, "Resistance", ee.resistance_type)
capacitance = EeValueFactType(fact_keys.capacitance, "Capacitance", ee.capacitance_type)
diff --git a/src/ee/part/fact_keys.py b/src/ee/part/fact_keys.py
index 65dc699..9617b9c 100644
--- a/src/ee/part/fact_keys.py
+++ b/src/ee/part/fact_keys.py
@@ -14,3 +14,4 @@ place_part = "http://purl.org/ee/fact-type/place-part"
imperial_footprint_size = "http://purl.org/ee/fact-type/imperial-footprint-size"
part_class = "http://purl.org/ee/fact-type/part-class"
+footprint = "http://purl.org/ee/fact-type/footprint"