Skip to content

photonlibpy: Explicitly re-export#1737

Merged
mcm001 merged 2 commits intoPhotonVision:mainfrom
thedropbears:py-reexport
Jan 18, 2025
Merged

photonlibpy: Explicitly re-export#1737
mcm001 merged 2 commits intoPhotonVision:mainfrom
thedropbears:py-reexport

Conversation

@auscompgeek
Copy link
Contributor

Pyright complains that these are private imports, rather than re-exports, emitting the reportPrivateImportUsage error.

"PhotonCamera" is not exported from module "photonlibpy"
"PhotonCameraSim" is not exported from module "photonlibpy.simulation"

There are two ways to declare a module exports an import:

  • Explicitly alias the import, i.e. from .foo import Foo as Foo
  • Declare the name in __all__ (which also affects from foo import *)

This chooses the latter.

@auscompgeek auscompgeek requested a review from a team as a code owner January 18, 2025 01:58
@mcm001 mcm001 merged commit ab41d2d into PhotonVision:main Jan 18, 2025
@Gold856 Gold856 added the photonlib Things related to the PhotonVision library label Jul 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

photonlib Things related to the PhotonVision library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants