remove unnecessary "is True"
@@ -80,7 +80,7 @@ class PeripheralDelegate(NSObject):
async def discoverServices(self, use_cached=True) -> [CBService]:
event = self._services_discovered_event
- if event.is_set() and (use_cached is True):
+ if event.is_set() and use_cached:
return self.peripheral.services()
event.clear()
@@ -93,7 +93,7 @@ class PeripheralDelegate(NSObject):
async def discoverCharacteristics_(
self, service: CBService, use_cached=True
) -> [CBCharacteristic]:
- if service.characteristics() is not None and use_cached is True:
+ if service.characteristics() is not None and use_cached:
return service.characteristics()
sUUID = service.UUID().UUIDString()
@@ -106,7 +106,7 @@ class PeripheralDelegate(NSObject):
async def discoverDescriptors_(
self, characteristic: CBCharacteristic, use_cached=True
) -> [CBDescriptor]:
- if characteristic.descriptors() is not None and use_cached is True:
+ if characteristic.descriptors() is not None and use_cached:
return characteristic.descriptors()
cUUID = characteristic.UUID().UUIDString()
@@ -119,7 +119,7 @@ class PeripheralDelegate(NSObject):
async def readCharacteristic_(
self, characteristic: CBCharacteristic, use_cached=True
) -> NSData:
- if characteristic.value() is not None and use_cached is True:
+ if characteristic.value() is not None and use_cached:
return characteristic.value()
cUUID = characteristic.UUID().UUIDString()
@@ -145,7 +145,7 @@ class PeripheralDelegate(NSObject):
async def readDescriptor_(
self, descriptor: CBDescriptor, use_cached=True
) -> NSData:
- if descriptor.value() is not None and use_cached is True:
+ if descriptor.value() is not None and use_cached:
return descriptor.value()
dUUID = descriptor.UUID().UUIDString()
