Skip to content

Commit

Permalink
chore: remove unused if check (#456)
Browse files Browse the repository at this point in the history
* feat: optimize ASyncProperty.map

* chore: remove unused if check
  • Loading branch information
BobTheBuidler authored Nov 29, 2024
1 parent 39f0497 commit 6a83282
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions a_sync/a_sync/property.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,6 @@ class _ASyncPropertyDescriptorBase(ASyncDescriptor[I, Tuple[()], T]):
Returns:
The property value.
"""
if instance is None:
raise ValueError(instance)
c_logger.debug("awaiting %s for instance %s", self, instance)
return await super().__get__(instance, owner)

Expand Down Expand Up @@ -189,7 +187,7 @@ class _ASyncPropertyDescriptorBase(ASyncDescriptor[I, Tuple[()], T]):
"""
c_logger.debug("mapping %s to instances: %s owner: %s", self, instances, owner)
return self._TaskMapping(
self,
self.hidden_method_descriptor,
instances,
owner=owner,
name=name or self.field_name,
Expand Down

0 comments on commit 6a83282

Please sign in to comment.