canonical / canonical/operator
Improve the typing UX of Object.on and CharmBase.on
Open
rainy day
- Dominant language
- Python
- Stars
- 267
- Forks
- 136
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 28
Description
`Object.on` is overridden by `CharmBase.on`, which [currently requires a type ignore](https://github.com/canonical/operator/blob/6032adbd34cce4d8e620b60a276b79de5b9f752f/ops/charm.py#L1478).
This is probably user facing as well, since we also need a `type: ignore` in our `testing` tests -- [see discussion here](https://github.com/canonical/operator/pull/2230#discussion_r2617540721).
We should investigate if we can provide a nicer typing UX here without backwards incompatible changes.
Contributor guide
Assessment
This issue has not been assessed yet.