opendp / opendp

The core library of differential privacy algorithms powering the OpenDP Project.
https://opendp.org
MIT License
287 stars 46 forks source link

More typing on context #1472

Closed mccalluc closed 2 weeks ago

mccalluc commented 1 month ago

I had started this a while ago and then forgot about it. Just some more type annotations.

mccalluc commented 1 month ago

Seemed like it should be easy, but there is a mypy error. Will investigate:

src/opendp/context.py:273: error: Incompatible return value type (got "tuple[Measure, float | None]", expected "tuple[Measure, float | tuple[float, float]]")  [return-value]
src/opendp/context.py:277: error: Incompatible return value type (got "tuple[Measure, tuple[float | None, float]]", expected "tuple[Measure, float | tuple[float, float]]")  [return-value]
Found 2 errors in 1 file (checked 75 source files)