Open
Description
openedon Jun 27, 2023
The main namespace azure.cosmos
aliases some classes from public modules, making those classes visible from two namespaces and documented twice:
azure-sdk-for-python/sdk/cosmos/azure-cosmos/azure/cosmos/__init__.py
Lines 24 to 44 in 85132dc
Clearly the intent is that customers do not access the sub-modules here.
As a possible solution, since our baseline is 3.7, we should be able to use PEP562 to hide those modules from doc while being backward compatible for customers. Something like this:
def __getattr__(name):
if name == "scripts":
from . import _scripts
return _scripts
...
raise AttributeErrorr()
Other solutions are fine too, as long as we achieve to show in doc only one class
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment