hoffstadt / hoffstadt/DearPyGui
Add missing type hints to kwargs on all function calls
- Dominant language
- C++
- Stars
- 15.6k
- Forks
- 783
- PR merge metrics
- No merged PRs in 30d
Description
## Version of Dear PyGui
Version: 1.7.1
Operating System: Win10
## My Issue/Question
Pylance/VSCode is giving me a hard time about missing type hints for kwargs on all function declarations in strict mode (it carries through into my code because it doesn't like the fact I'm calling what it thinks is a partially un-type-defined function. Luckily, the fix is pretty simple; changing every `**kwargs` in a function definition to `**kwargs: Any` will resolve the problem for many functions; others will require adding parameters to Callable. I don't yet know the library well enough to know what these should be -- it depends on what the callbacks are, but possibly `Callable[..., None]` would work if nothing is returned and 0-3 args of any type can be passed in.
## To Reproduce
N/A
## Expected behavior
N/A
## Screenshots/Video
N/A
## Standalone, minimal, complete and verifiable example
Before:
```
def configure_app(**kwargs) -> None:
"""Configures an item after creation."""
internal_dpg.configure_app(**kwargs)
```
After:
```
def configure_app(**kwargs: Any) -> None:
"""Configures an item after creation."""
internal_dpg.configure_app(**kwargs)
```
Contributor guide
Assessment
This issue has not been assessed yet.