mirror of
https://github.com/clementine-player/Clementine
synced 2025-01-31 03:27:40 +01:00
Include automatically generated docstrings for functions that don't have any
This commit is contained in:
parent
dfcffc7316
commit
a9336c4d80
@ -15,6 +15,7 @@ macro(add_sip_binding outputvar source)
|
||||
set(PYQT_SIP_FLAGS
|
||||
"-x" "VendorID"
|
||||
"-x" "PyQt_NoPrintRangeBug"
|
||||
"-o"
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
|
@ -27,9 +27,6 @@
|
||||
int main(int argc, char** argv) {
|
||||
QApplication a(argc, argv);
|
||||
|
||||
// Register some meta types required by the exposed classes
|
||||
qRegisterMetaType<PlaylistItemPtr>("PlaylistItemPtr");
|
||||
|
||||
// Create the python engine
|
||||
ScriptManager manager;
|
||||
LanguageEngine* language_engine =
|
||||
|
@ -1,12 +1,35 @@
|
||||
import clementine
|
||||
import epydoc.cli
|
||||
import epydoc.docintrospecter
|
||||
import PyQt4.QtCore
|
||||
import sys
|
||||
|
||||
import inspect
|
||||
|
||||
def is_pyqt_wrapper_class(thing):
|
||||
return epydoc.docintrospecter.isclass(thing) and \
|
||||
isinstance(thing, PyQt4.QtCore.pyqtWrapperType)
|
||||
|
||||
def introspect_pyqt_wrapper_class(thing, doc, module_name=None):
|
||||
doc = epydoc.docintrospecter.introspect_class(thing, doc, module_name=module_name)
|
||||
|
||||
for name in thing.__dict__.keys():
|
||||
if name in doc.variables and hasattr(thing, name):
|
||||
actual_var = getattr(thing, name)
|
||||
val_doc = epydoc.docintrospecter.introspect_docs(
|
||||
actual_var, context=doc, module_name=module_name)
|
||||
var_doc = epydoc.docintrospecter.VariableDoc(
|
||||
name=name, value=val_doc, container=doc, docs_extracted_by='introspecter')
|
||||
doc.variables[name] = var_doc
|
||||
|
||||
return doc
|
||||
|
||||
epydoc.docintrospecter.register_introspecter(is_pyqt_wrapper_class, introspect_pyqt_wrapper_class)
|
||||
|
||||
|
||||
sys.argv = [
|
||||
"epydoc",
|
||||
"--html",
|
||||
"-o", "output",
|
||||
"--introspect-only",
|
||||
"-v",
|
||||
"--name", "clementine",
|
||||
"--url", "http://www.clementine-player.org",
|
||||
|
Loading…
x
Reference in New Issue
Block a user