tech: ensure boolean types are always returned (#752)

This commit is contained in:
Paweł Lidwin 2026-04-30 15:03:20 +02:00 committed by GitHub
parent 46f8445a06
commit e747bbb34e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -83,15 +83,15 @@ class Game:
@property
def is_dlc(self):
return self.metadata and 'mainGameItem' in self.metadata
return self.metadata is not None and 'mainGameItem' in self.metadata
@property
def is_ubisoft_game(self) -> bool:
return self.third_party_store and self.third_party_store.lower() in ['ubisoftconnect']
return self.third_party_store is not None and self.third_party_store.lower() in ['ubisoftconnect']
@property
def is_origin_game(self) -> bool:
return self.third_party_store and self.third_party_store.lower() in ['origin', 'the ea app']
return self.third_party_store is not None and self.third_party_store.lower() in ['origin', 'the ea app']
@property
def third_party_store(self) -> Optional[str]:
@ -113,11 +113,11 @@ class Game:
@property
def supports_cloud_saves(self):
return self.metadata and (self.metadata.get('customAttributes', {}).get('CloudSaveFolder') is not None)
return self.metadata is not None and (self.metadata.get('customAttributes', {}).get('CloudSaveFolder') is not None)
@property
def supports_mac_cloud_saves(self):
return self.metadata and (self.metadata.get('customAttributes', {}).get('CloudSaveFolder_MAC') is not None)
return self.metadata is not None and (self.metadata.get('customAttributes', {}).get('CloudSaveFolder_MAC') is not None)
@property
def additional_command_line(self):