Comments (9)
Would you be interested in doing a pull request for that?
You would need to
-
add a new methodbetter, andpdoc.Function.annotations()
(likened topdoc.Function.params()
, likely simpler) - modify HTML template to (conditionally) show type annotations.
from pdoc.
@kernc Sorry, I had entirely missed you replied here. Yes, obviously I'm pretty interested in writing the code for this ^.^
from pdoc.
@nbraud do you plan on submitting a PR with your commit?
from pdoc.
@omtinez PR #7 is in progress. Welcome to continue where it's left off.
from pdoc.
This is not done. Text template doesn't look into config.mako nor does it print types by default. I'll see what I can do about that and about hyperlinking documented types in HTML output.
from pdoc.
Hyperlinked types testable with:
pdoc --html -c show_type_annotations=True your_module
from pdoc.
Types are not showing up on my project. Fresh pdoc3
install so I assume it is the latest version published, testing it with --http
option. Am I missing something? Thanks :)
Edit: didn't read the previous comment. Adding -c show_type_annotations=True
worked. I didn't find anything about this option in the documentation though. Also I think the CLI option could be nicer, something like --types
/ -t
.
from pdoc.
After some more testing I've seen it works pretty well, nice!
I have a couple of suggestions:
- Class / instance property and variable types are not being documented.
- Standard library types could be linked to the official online documentation, specially the
Typings
library.
from pdoc.
@DaniGuardiola, care to open a new issue for missing variable/property annotations?
from pdoc.
Related Issues (20)
- Upgrade code reference warnings to errors. HOT 1
- --skip-errors flag does not work
- feature request: support for headings to organize functions
- Include html containing javascript
- Using a - in folder names prevents linking
- missing docstrings of methods HOT 3
- syntax error with match-case function HOT 1
- Incorrectly rendered Args section HOT 1
- Add GitHub Flavor Markdown support HOT 2
- Remove indentation in text template for markdown files HOT 1
- Deprecation warning for PEP224 class variable docstrings
- "x | y" does not work but "Union[x, y]" does HOT 4
- pdoc3 0.11.0 installation regression vs 0.10.0. HOT 3
- version 0.11 is not compatible with python 3.7 HOT 2
- Search function HOT 3
- Links not generated in Markdown tables HOT 1
- Cannot get search to work HOT 2
- Make it possible to ignore class members based on wildcard strings HOT 1
- setting `git_link_template` causes failures on `property` and `cached_property`
- submodule containing a function or class of the same name as the submodule won't be identified
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pdoc.