Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enforce more type hints #357

Merged
merged 3 commits into from
Jun 11, 2024
Merged

Enforce more type hints #357

merged 3 commits into from
Jun 11, 2024

Conversation

cjpatton
Copy link
Collaborator

Partially addresses #59.

This covers everything but Prio3 and Poplar1, which may turn out to be more complicated.

One notable issue: The signature for `run_daf()` was previously

```
def run_daf(Daf,
            agg_param: Daf.AggParam,
            measurements: list[Daf.Measurement],
            nonces: list[bytes]):
```

We want to treat `Daf` as a generic parameter, but that's not how it's
interpreted by mypy. The first argument, `Daf`, shadows `class Daf`
above, but the type hints here actually refer to the shadowed variable.
To resolve this, simply remove the type hints.
@cjpatton cjpatton marked this pull request as ready for review June 11, 2024 20:13
@cjpatton cjpatton merged commit 6684fcc into main Jun 11, 2024
6 checks passed
@divergentdave divergentdave deleted the cjpatton/59/3 branch July 2, 2024 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants