When inheriting a type variable defined as Generic, how can I write documentation with the concretized type variable? #308
Replies: 3 comments 8 replies
|
Could you elaborate on what you're trying to achieve with code examples? I'm not sure to understand. I also wasn't able to understand what your code is doing by quickly looking at it. If you modify the signature in-place, it should also impact how the docstring is parsed, and therefore what the parameters section displays. Maybe it doesn't because you're copying objects instead of modifying them in-place? |
0 replies
|
@jonghwanhyeon I see you closed the discussion. Have you resolved your issue? Could you tell us how? |
6 replies
|
I solved the problem by using function =deepcopy(member, memo={id(member.parent): member.parent}) |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Based on what I’ve found, unless the child class explicitly defines the type annotation, the type will be represented by the type variable defined as Generic.
To address this, I wrote an Extension, but I found that it applies to the Signature section and not to the Parameters section.
Is there a part I missed in the Extension I wrote, or is there an easier way to solve this problem?
All reactions