Comments (2)
Where did you learn about this tk.Event[tk.Text]
syntax?
This is not a pdoc bug, this is an issue with tkinter or with the annotation: If you open a Python shell and run tk.Event[tk.Text]
, you will get the same error. It's only due to from __future__ import annotations
that you don't get errors when running your Python program.
from pdoc.
I saw it while using VS Code, and the mypy extension.
When hovering over a function, it showed a tooltip with the function signature, and all the parameters with their types. I think it's a feature of the Pylance extension to show the tooltips like this. One of them showed Event[Text]
. See screenshot below for an example.
Adding it to my code allowed mypy to type check the inner members of an expression, like event.widget.tag_nextrange()
, showing that tag_nextrange()
is actually a method for the given widget. Since it didn't cause any issues running my code, I kept it and added it elsewhere. I was already using from __future__ import annotations
to get the int | None
type hinting functionality.
from pdoc.
Related Issues (20)
- `TYPE_CHECKING` warnings when used with Pydantic models HOT 1
- "View Source" button for @property, @cached_property methods HOT 8
- source_file not extracted for cached function
- Multiple reference duplication when loading docstring of function HOT 1
- [Question] Is there any way to prevent pdoc from documenting method objects? HOT 5
- 🙏 HOT 1
- explicit re-export from a private module should make the member public HOT 2
- support the `@deprecated` decorator HOT 1
- Link is not working when class is included in `__all__`
- Fails without error in CI for certain import statements HOT 5
- Add `overflow-y: hidden;` to css style `mjx-container` HOT 1
- Error importing module: no signature found for builtin type `<class 'type I wrote'>` HOT 3
- Proposal: Document each member at the lowest-level submodule, with higher level modules pointing at submodule's primary declaration without duplicating them. HOT 2
- TypeError in /pdoc/extract.py HOT 2
- add pre-commit support HOT 1
- Support `start-after` option for `.. include::` directive HOT 1
- Way to add external Markdown file HOT 2
- A way to NOT inherit documentation for a specific class HOT 4
- Store generated html docs in a folder HOT 4
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.