Closed EltonChou closed 1 year ago
Describe the bug In vscode, current templates will cause pylance to raises the reportPrivateImportUsage.
reportPrivateImportUsage
To Reproduce
try.py
from the_client import AuthenticatedClient from the_client.api.the_tag import get_stuff from the_client.models import Stuff
pylance message:
"AuthenticatedClient" is not exported from module "the_client" Import from "the_client.client" instead
"Stuff" is not exported from module "the_client.models" Import from "the_client.models.stuff" instead`
Expected behavior The class should be imported without any error message. It can be fixed by adding __all__ symbol to solve this issue. ref: https://github.com/microsoft/pyright/blob/main/docs/typed-libraries.md#library-interface
__all__
OpenAPI Spec File Not related to OpenAPI spec.
Desktop (please complete the following information):
Additional context Add any other context about the problem here.
Relates to #631 & #540 I think
Describe the bug In vscode, current templates will cause pylance to raises the
reportPrivateImportUsage
.To Reproduce
try.py
pylance message:
Expected behavior The class should be imported without any error message. It can be fixed by adding
__all__
symbol to solve this issue. ref: https://github.com/microsoft/pyright/blob/main/docs/typed-libraries.md#library-interfaceOpenAPI Spec File Not related to OpenAPI spec.
Desktop (please complete the following information):
Additional context Add any other context about the problem here.