Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def brand(self) -> Brand:
"""Brand object."""
wmi = self.wmi
brand = WMI.get(wmi)
if not brand:
brand = WMI.get(wmi[:2])
if isinstance(brand, str):
brand = Brand(brand)
if brand is None:
brand = UnsupportedBrand()
return brand