Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __gt__(self, other):
if isinstance(other, BaseDiagnosis):
return self.code > other.code
else:
return self.code > other