Commit 8f94d9a
authored
Improvements to stubgenc (#14564)
This bundles together a handful of improvements to stubgenc. Each one
has its own commit, but it can be somewhat time consuming to get a PR
reviewed and merged, so I'm putting them together for the sake of
expediency. I'll break them up if it is preferred.
An overview of the main changes:
- infer return types for known special methods: previously only argument
types were inferred
- check class docstrings for signatures in addition to `__init__`:
shiboken binding generator is known to put constructor signatures in
class docstrings rather than on `__init__`
- use the list of analyzed modules to produce better imports: previously
when given `foo.Bar.Spangle`, it was assumed that `import foo.Bar`
should be added, however, it could be that `Bar.Spangle` refers to
nested classes within the module `foo`.
- when fixing up types, also process children of compound types
- evaluate descriptors when getting members: necessary for shiboken
bindings1 parent 1a47b19 commit 8f94d9a
3 files changed
+373
-147
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1720 | 1720 | | |
1721 | 1721 | | |
1722 | 1722 | | |
| 1723 | + | |
1723 | 1724 | | |
1724 | 1725 | | |
1725 | 1726 | | |
| |||
1728 | 1729 | | |
1729 | 1730 | | |
1730 | 1731 | | |
1731 | | - | |
| 1732 | + | |
| 1733 | + | |
| 1734 | + | |
1732 | 1735 | | |
1733 | 1736 | | |
1734 | 1737 | | |
| |||
0 commit comments