From 6a832821db572abfd9de745495775942ce4474c6 Mon Sep 17 00:00:00 2001 From: BobTheBuidler <70677534+BobTheBuidler@users.noreply.github.com> Date: Thu, 28 Nov 2024 23:24:32 -0400 Subject: [PATCH] chore: remove unused if check (#456) * feat: optimize ASyncProperty.map * chore: remove unused if check --- a_sync/a_sync/property.pyx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/a_sync/a_sync/property.pyx b/a_sync/a_sync/property.pyx index 599883e0..7fffda70 100644 --- a/a_sync/a_sync/property.pyx +++ b/a_sync/a_sync/property.pyx @@ -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) @@ -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,