pandera icon indicating copy to clipboard operation
pandera copied to clipboard

Pylance: "errors" is not exported from module "pandera.pandas"

Open karabays opened this issue 5 months ago • 0 comments

Describe the bug Similar to issue #1726, "errors" also not included in __all__ in pandas module. Adding "errors" solves the Pylance problem.

  • [x] I have checked that this issue has not already been reported.
  • [x] I have confirmed this bug exists on the latest version of pandera.
  • [ ] (optional) I have confirmed this bug exists on the main branch of pandera.
import pandera.pandas as pa

def validate_post_schema(df):
	console.print('Starting post validation.')
	try:
		post_schema.validate(df)
		console.print('Finished post validation, no errors found.')
	except pa.errors.SchemaError as exc:
		console.print(f'[bold red]Post validation errors found.[/bold red] {exc}')

Expected behavior

Pylance shouldn't flag pa.error as reportPrivateImportUsage

Desktop (please complete the following information):

  • OS: Windows 11
  • Version: Pandera 0.25.0

karabays avatar Jul 29 '25 08:07 karabays