I’ve done some research about generating signatures based on @storchaka feedback and I now agree that we cannot make this the default. But, adding include_unrepresentable=False flag to inspect.signature function seems like a simple and working solution.
It will:
- Allow us to use
inspect.signature(..., include_unrepresentable=True)on all things inside (like inpydoc,help(), etc). And things that haveNULLdefault will work correctly for our use-case - Not break anyone else’s code
- Not complicate future potential
inspect.signaturesimplementation
Downsides:
- We will leak our internal tooling (which I consider it to be) as a public API, so maybe
_include_unrepresentable, to indicate that this is some very strange argument?