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

examples: run mypy on repo example #1697

Closed
jku opened this issue Nov 30, 2021 · 3 comments · Fixed by #1701
Closed

examples: run mypy on repo example #1697

jku opened this issue Nov 30, 2021 · 3 comments · Fixed by #1701
Assignees
Milestone

Comments

@jku
Copy link
Member

jku commented Nov 30, 2021

repository example is not completely annotated. mypy config (currently in setup.cfg) does not cover the example: it should cover the whole examples/ directory.

It looks like this means some minor annotation fixes in the example (mostly to deal with roles dictionary items).

@lukpueh
Copy link
Member

lukpueh commented Nov 30, 2021

Quick question, is there a consensus (#1130, #1301..?) to use type annotations everywhere?

@jku
Copy link
Member Author

jku commented Nov 30, 2021

I ... don't know. I like them so much now that I just kind of assumed.

To be clear, I do think that

  • we should aim to cover most of our code with static typing
  • we should document this as the safest way to use the APIs: if applications check types statically that means our validation code can concentrate on validating deserialized json (instead of concentrating on validating application provided input)

@MVrachev
Copy link
Collaborator

MVrachev commented Dec 1, 2021

I can take this one as I already added examples locally when addressing comments for #1699.

@MVrachev MVrachev self-assigned this Dec 1, 2021
@MVrachev MVrachev added this to the Sprint 13 milestone Dec 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants