Enable automatic docstring genereation in SIP
ClosedPublic

Authored by rbreu on Jan 24 2019, 7:20 PM.

Details

Reviewers
rempt
Group Reviewers
Krita
Summary

This enables the automatic docstring generation for the Python API.

It's unfortunately only very basic: Just the method signatures without even the argument names. I was hoping it would at least also take the argument names of the signature into account, but it doesn't. :-( The only way towards better docstrings, apart from this, seems to be to hand-craft docstrings in the sip files.

But I think this is better than nothing? I don't see any reason not to enable it.

Test Plan

Type this into Scripter:

import krita
print(help(krita.Krita.createDocument))

Without this patch, this will give you:

Help on built-in function createDocument:

createDocument(...)

And with the patch:

Help on built-in function createDocument:

createDocument(...)
    createDocument(self, int, int, str, str, str, str, float) -> Document

Diff Detail

Repository
R37 Krita
Lint
Lint Skipped
Unit
Unit Tests Skipped
rbreu created this revision.Jan 24 2019, 7:20 PM
Restricted Application added a reviewer: Krita. · View Herald TranscriptJan 24 2019, 7:20 PM
Restricted Application added a project: Krita. · View Herald Transcript
rbreu requested review of this revision.Jan 24 2019, 7:20 PM
rempt accepted this revision.Jan 24 2019, 7:55 PM
rempt added a subscriber: rempt.

Oh, yes, it's an improvement for sure!

This revision is now accepted and ready to land.Jan 24 2019, 7:55 PM
rbreu closed this revision.Jan 25 2019, 1:41 PM