예제 #1
0
파일: component.py 프로젝트: vxyfv/KiBoM
    def compareValue(self, other):
        #simple string comparison
        if self.getValue().lower() == other.getValue().lower(): return True

        #otherwise, perform a more complicated value comparison
        if units.compareValues(self.getValue(), other.getValue()): return True

        #no match, return False
        return False
예제 #2
0
    def compareValue(self, other):
        #simple string comparison
        if self.getValue().lower() == other.getValue().lower(): return True

        #otherwise, perform a more complicated value comparison
        if units.compareValues(self.getValue(), other.getValue()): return True

        #Ignore value if both components are connectors
        if self.prefs.groupConnectors:
            if 'connector' in self.getLibName().lower() and 'connector' in other.getLibName().lower():
                return True

        #no match, return False
        return False
예제 #3
0
    def compareValue(self, other):
        #simple string comparison
        if self.getValue().lower() == other.getValue().lower(): return True

        #otherwise, perform a more complicated value comparison
        if units.compareValues(self.getValue(), other.getValue()): return True

        #Ignore value if both components are connectors
        if self.prefs.groupConnectors:
            if 'connector' in self.getLibName().lower() and 'connector' in other.getLibName().lower():
                return True

        #no match, return False
        return False