#122
Fix Attrs method annotation evaluation
As I understand, Attrs[T] should inspect only class attributes, not methods. Previously, the Attrs path still called get_local_defns() in a mode that processed methods, which could execute PEP 649 __annotate__ functions before Attrs filtered anything out.
The problem is that some methods may not have good runtime annotations. For example, something like this:
if TYPE_CHECKING:
class HiddenNamespace:
pass
class Base:
def rebuild(self, ns: HiddenNamespace | None = None) -> bool | None:
return None
class Model(Base):
name: strAttrs[Model] should evaluate only Model.name and not raise an error, as evaluation of methods is not required for the Attribute types.
The bigger problem is that the runtime can't run the insides of the if TYPE_CHECKING block, and i guess there is nothing we can do about this
@iliyasone is attempting to deploy a commit to the Vercel Labs Team on Vercel.
A member of the Team first needs to authorize it.