Skip to content

Pyright reportPrivateImportUsage when from datasets import load_dataset  #3841

@lkhphuc

Description

@lkhphuc

Describe the bug

Pyright complains about module not exported.

Steps to reproduce the bug

Use an editor/IDE with Pyright Language server with default configuration:

from datasets import load_dataset

Expected results

No complain from Pyright

Actual results

Pyright complain below:

`load_dataset` is not exported from module "datasets"
 Import from "datasets.load" instead [reportPrivateImportUsage] 

Importing from datasets.load does indeed solves the problem but I believe importing directly from top level datasets is the intended usage per the documentation.

Environment info

  • datasets version: 1.18.3
  • Platform: macOS-12.2.1-arm64-arm-64bit
  • Python version: 3.9.10
  • PyArrow version: 7.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions