-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Explicitly add all public ops.X names to __all__ in __init__.py (#937)
This is so that when using "import ops; ops.X" in a charm, Pyright and MyPy won't complain (in the charm's codebase). For example, MyPy: src/charm.py:14: error: Name "ops.CharmBase" is not defined [name-defined] And Pyright: src/charm.py:32:50 - error: "CharmBase" is not exported from module "ops" (reportPrivateImportUsage) This also avoids disabling the reportUnusedImport setting. I was considering adding a test that checked that __all__ stays in sync with the imports below, but Pyright errors if we have a entry in one but not the other. Also: * Remove submodules from docs to avoid duplicate entries * A few other docs fixes/simplifications * Sort docs alphabetically. This makes things easier to find. If you want source order, read the source.
- Loading branch information
Showing
6 changed files
with
169 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters