Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Pinject has difficulty to instantiate an instance for a subclass based on an abstract class #6

Open
damingwang00 opened this issue Mar 31, 2014 · 1 comment

Comments

@damingwang00
Copy link

For example:

import pinject
import abc
class AbstrctClass(object):
... metaclass = abc.ABCMeta
...
class SomeClass(AbstrctClass):
... pass
...
obj_graph = pinject.new_object_graph(modules=None, classes=[AbstrctClass])
Traceback (most recent call last):
File "", line 1, in
File "/google/src/cloud/daming/fix/google3/third_party/py/pinject/object_graph.py", line 159, in new_object_graph
raise e
pinject.errors.WrongArgElementTypeError: wrong type for element 0 of arg classes: expected type but got ABCMeta

@kavika13
Copy link

This looks like a dupe of #5 to me

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants