You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
~/.virtualenvs/bleeding/lib/python3.10/site-packages/ghapi/all.py in <module>
----> 1 from .core import *
2from .actions import*3from .auth import*
~/.virtualenvs/bleeding/lib/python3.10/site-packages/ghapi/core.py in <module>
3__all__= ['GH_HOST', 'GhApi', 'date2gh', 'gh2date', 'print_summary', 'EMPTY_TREE_SHA']
5# Cell
----> 6 from fastcore.utils import *
7from fastcore.foundation import*8from fastcore.meta import*
~/.virtualenvs/bleeding/lib/python3.10/site-packages/fastcore/utils.py in <module>
2from .test import*3from .basics import*
----> 4 from .xtras import *
5from .parallel import*6from .net import*
~/.virtualenvs/bleeding/lib/python3.10/site-packages/fastcore/xtras.py in <module>
50@patch
---> 51 def __repr__(self:AttrDict): return repr_dict(self)
~/.virtualenvs/bleeding/lib/python3.10/site-packages/fastcore/basics.py in patch(f, as_prop, cls_method)
773if f isNone: return partial(patch, as_prop=as_prop, cls_method=cls_method)
774cls=next(iter(f.__annotations__.values()))
--> 775 return patch_to(cls, as_prop=as_prop, cls_method=cls_method)(f)
~/.virtualenvs/bleeding/lib/python3.10/site-packages/fastcore/basics.py in patch_to.<locals>._inner(f)
759# `functools.update_wrapper` when passing patched function to `Pipeline`, so we do it manually760for o in functools.WRAPPER_ASSIGNMENTS: setattr(nf, o, getattr(f,o))
--> 761 nf.__qualname__ = f"{c_.__name__}.{nm}"
762if cls_method:
763setattr(c_, nm, MethodType(nf, c_))
AttributeError: 'str' object has no attribute '__name__'
In [70]: %debug
> /home/tcaswell/.virtualenvs/bleeding/lib/python3.10/site-packages/fastcore/basics.py(761)_inner()
759# `functools.update_wrapper` when passing patched function to `Pipeline`, so we do it manually760for o in functools.WRAPPER_ASSIGNMENTS: setattr(nf, o, getattr(f,o))
--> 761 nf.__qualname__ = f"{c_.__name__}.{nm}"
762if cls_method:
763setattr(c_, nm, MethodType(nf, c_))
ipdb> p c_
'AttrDict'
ipdb>
It looks like switching from obj.__annotations__ to typing.get_type_hints(obj) should be enough?
The text was updated successfully, but these errors were encountered:
Due to https://www.python.org/dev/peps/pep-0563/ delaying the evaluation of annotations until
It looks like switching from
obj.__annotations__
totyping.get_type_hints(obj)
should be enough?The text was updated successfully, but these errors were encountered: