Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Public symbols not properly exported withpy.typed present — triggers Pylance/Pyright errors #694

Open
@andersou

Description

@andersou

Hi team,

Thanks for maintaining this package — it's a great tool for working with InfluxDB.

I'm opening this issue to report a problem that affects type checkers and IDEs (like Pyright, Pylance, and mypy) due to the presence of thepy.typed file in theinfluxdb-client-python package.

Since the package declares itself as typed (viapy.typed, per [PEP 561](https://peps.python.org/pep-0561/)), tools likePyright andPylance apply stricter rules around public API exposure. Specifically,public symbols must be explicitly exported using either:

  • a__all__ list in__init__.py, or
  • .pyi stub files.

Currently, this is not the case for the main client class. When importingInfluxDBClient from the top-level module as documented:

frominfluxdb_clientimportInfluxDBClient

Pylance (and Pyright) raises the following error:

"InfluxDBClient" is not exported from module "influxdb_client"  Import from "influxdb_client.client.influxdb_client" insteadPylance: reportPrivateImportUsage

This is confusing to users and suggests that the public API is not properly defined.

Suggested solutions

To resolve this and ensure compatibility with type checkers, here are a few possible approaches:

  1. Add__all__ toinfluxdb_client/__init__.py to explicitly define the intended public interface.
  2. Provide proper.pyi stub files that describe the public API.
  3. If full typing support is not maintained,consider removing thepy.typed file to avoid stricter validation.

Improving this would help developers relying on static analysis and IDE support, and reduce confusion about which imports are officially supported.

Thanks again for your work and for considering this issue!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp