diff --git a/lbry/extras/daemon/components.py b/lbry/extras/daemon/components.py index fed656572..674d9c53e 100644 --- a/lbry/extras/daemon/components.py +++ b/lbry/extras/daemon/components.py @@ -539,8 +539,8 @@ class UPnPComponent(Component): success = False await self._maintain_redirects() if self.upnp: - if not self.upnp_redirects and not all([x in self.component_manager.skip_components for x in - (DHT_COMPONENT, PEER_PROTOCOL_SERVER_COMPONENT)]): + if not self.upnp_redirects and not all(x in self.component_manager.skip_components for x in + (DHT_COMPONENT, PEER_PROTOCOL_SERVER_COMPONENT)): log.error("failed to setup upnp") else: success = True diff --git a/lbry/stream/descriptor.py b/lbry/stream/descriptor.py index 2e2626b9b..fadabf29c 100644 --- a/lbry/stream/descriptor.py +++ b/lbry/stream/descriptor.py @@ -183,11 +183,11 @@ class StreamDescriptor: raise InvalidStreamDescriptorError("Does not decode as valid JSON") if decoded['blobs'][-1]['length'] != 0: raise InvalidStreamDescriptorError("Does not end with a zero-length blob.") - if any([blob_info['length'] == 0 for blob_info in decoded['blobs'][:-1]]): + if any(blob_info['length'] == 0 for blob_info in decoded['blobs'][:-1]): raise InvalidStreamDescriptorError("Contains zero-length data blob") if 'blob_hash' in decoded['blobs'][-1]: raise InvalidStreamDescriptorError("Stream terminator blob should not have a hash") - if any([i != blob_info['blob_num'] for i, blob_info in enumerate(decoded['blobs'])]): + if any(i != blob_info['blob_num'] for i, blob_info in enumerate(decoded['blobs'])): raise InvalidStreamDescriptorError("Stream contains out of order or skipped blobs") descriptor = cls( loop, blob_dir, diff --git a/lbry/wallet/ledger.py b/lbry/wallet/ledger.py index 04ed2808c..ab10e7201 100644 --- a/lbry/wallet/ledger.py +++ b/lbry/wallet/ledger.py @@ -1060,7 +1060,7 @@ class Ledger(metaclass=LedgerRegistry): 'abandon_info': [], 'purchase_info': [] } - is_my_inputs = all([txi.is_my_input for txi in tx.inputs]) + is_my_inputs = all(txi.is_my_input for txi in tx.inputs) if is_my_inputs: # fees only matter if we are the ones paying them item['value'] = dewies_to_lbc(tx.net_account_balance + tx.fee)