6

When turning on "python.analysis.typeCheckingMode": "strict" or "python.analysis.typeCheckingMode": "basic", .py files containing imports of other modules do not recognize reimports and highlight them with errors:

"Flow" is not exported from module "prefect"
  Import from "prefect.core" insteadPylancereportPrivateImportUsage

where the original module has __init__.py but does not contain __all__ export but does import all the individual objects(in the case above Flow). Is there any way of turning that particular setting off in settings.json or dealing with muting the error noise?

Mat
  • 61
  • 2

1 Answers1

2

You can turn this setting off by setting an override in settings.json:

  "python.analysis.diagnosticSeverityOverrides": {
    "reportPrivateImportUsage":"none" 
  }

You can also set it to "warning" or "information" for less intrusive notifications.

Marcin
  • 1,321
  • 7
  • 15