`experimental` decorator breaks class documentation.
See original GitHub issueThe experimental
decorator used on classes break documentation. This could be one manifestation but there is an issue with how the documentation including type hints are propagated to the decorated class. This does not apply for free functions.
See https://github.com/optuna/optuna/pull/1265#issuecomment-633195955 for how it may break.
Expected behavior
Class documentation should not be altered by applying the experimental decorator.
Steps to reproduce
- Apply the experimental decorator to a class.
- Build the document (
cd docs && make html
) - Open the rendered documentation and note that the class signatures is broken.
Additional context (optional)
- An issue regarding the indentation https://github.com/optuna/optuna/issues/1213.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Breaking change to default useDefineForClassFields to true ...
This is a breaking change for any code with "experimentalDecorators": true , but I can't find documentation for it anywhere.
Read more >Documentation - Decorators - TypeScript
Decorators are a stage 2 proposal for JavaScript and are available as an experimental feature of TypeScript. NOTE Decorators are an experimental feature ......
Read more >Experimental decorators warning in TypeScript compilation
For me, this error "Experimental support for decorators is a feature that is subject to change in a future release. (etc)" only happened...
Read more >How To Use Decorators in TypeScript - DigitalOcean
This tutorial will show you how create your own decorators in TypeScript for classes and class members, and also how to use them....
Read more >Solving warning: “Experimental support for decorators is a ...
This article describes how to solve this warning that could be shown after use “decorators” in TypeScript. A “decorator” is a special kind...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It looks fine. I’ll submit a PR.
Before:
After:
Decorating
wrapped_init
byfunctools.wraps
and removingfunc_spec_str
should solve this issue.