def shellComparator(shell, vehicle): if vehicle is not None: vDescriptor = vehicle.descriptor basicShellDescr = getBasicShell(vDescriptor) return ItemsComparator(params.ShellParams(shell.descriptor, vDescriptor).getParamsDict(), params.ShellParams(basicShellDescr, vDescriptor).getParamsDict()) else: return
def isBasic(self): return self._vehicleDescr is not None and getBasicShell(self._vehicleDescr).compactDescr == self._itemDescr.compactDescr