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
TypeError: No matching overloads found for org.jpype.javadoc.JavadocExtractor.getDocumentation(_jpype._JClass), options are:
public static org.jpype.javadoc.Javadoc org.jpype.javadoc.JavadocExtractor.getDocumentation(java.lang.Class)
staring at the code I think the magic getattr(cls, '__doc__', None) should fail more gracefully, like, just return None, if there is neither python __doc__ nor _Java javadoc are available,
the stub generation also fails in the same way for these modules:
-m MODULE stubgen param
cls failing getattr(cls, 'doc', None)
-m _jpype
<java class '_jpype._JArrayPrimitive'>
-m jpype._jclass
<java class 'JInterface'>
-m jpype._jexception
<java class 'JException'>
-m jpype._jarray
<java class 'JArray'>
please advise :-)
PS: an additional argument --ignore-errors leads to quite some useful output already, so this already gets some nice output:
Hi,
I'm generating .py stubs for jpype itself, using mypy stubgen, like so:
this tries to
getattr(cls, "__doc__", None)
where cls is<java class '_jpype._JArrayPrimitive'>
:which, through an intricate c++ and java stack, then fails glamorously in
_jclassDoc(cls)
, like so:staring at the code I think the magic
getattr(cls, '__doc__', None)
should fail more gracefully, like, just return None, if there is neither python__doc__
nor _Java javadoc are available,the stub generation also fails in the same way for these modules:
-m MODULE
stubgen paramcls
failing getattr(cls, 'doc', None)-m _jpype
<java class '_jpype._JArrayPrimitive'>
-m jpype._jclass
<java class 'JInterface'>
-m jpype._jexception
<java class 'JException'>
-m jpype._jarray
<java class 'JArray'>
please advise :-)
PS: an additional argument
--ignore-errors
leads to quite some useful output already, so this already gets some nice output:requirements.txt
:The text was updated successfully, but these errors were encountered: