Problem
braintrust.Eval's overloaded signature references several private types:
_EvalCaseDict
_EvalCaseDictNoOutput
_ExperimentDatasetEvent
Under pyright's strict mode, any symbol prefixed with _ from another module is treated as private/unexported. Because these appear in the data parameter's union, pyright flags the entire Eval signature as "partially unknown":
Type of "Eval" is partially unknown
This forces downstream consumers in strict mode to either suppress reportUnknownMemberType or route through Any, even though the types are perfectly well-defined — they're just underscore-prefixed.
Reproduction
# pyproject.toml
[tool.pyright]
typeCheckingMode = "strict"
import braintrust
braintrust.Eval(...) # reportUnknownMemberType: Type of "Eval" is partially unknown
pyright 1.1.408, braintrust 0.0.173.
Suggested fix
Either:
- Rename the types to drop the underscore prefix (
EvalCaseDict, EvalCaseDictNoOutput, ExperimentDatasetEvent) and export them, or
- Restructure the overloads so private types don't appear in the public signature (e.g. widen to a structural protocol or
TypedDict base)
Problem
braintrust.Eval's overloaded signature references several private types:_EvalCaseDict_EvalCaseDictNoOutput_ExperimentDatasetEventUnder pyright's
strictmode, any symbol prefixed with_from another module is treated as private/unexported. Because these appear in thedataparameter's union, pyright flags the entireEvalsignature as "partially unknown":This forces downstream consumers in strict mode to either suppress
reportUnknownMemberTypeor route throughAny, even though the types are perfectly well-defined — they're just underscore-prefixed.Reproduction
pyright 1.1.408, braintrust 0.0.173.
Suggested fix
Either:
EvalCaseDict,EvalCaseDictNoOutput,ExperimentDatasetEvent) and export them, orTypedDictbase)