Skip to content

ngclient: type annotations review and mypy integration #1409

Closed

Description

@jku

ngclient type annotations are not complete: once mypy is in use (#1395), we should

  • enable mypy for ngclient
  • fix any annotation issues

Activity

  1. added
    backlog
    on May 26, 2021
  2. added this to the weeks22-23 milestone on May 26, 2021
  3. removed this from the weeks22-23 milestone on Jun 9, 2021
  4. added this to the weeks26-27 milestone on Jun 23, 2021
  5. jku commented on Jun 30, 2021

    @jku
    MemberAuthor

    I was planning to handle this but will push forward: this makes sense after both #1408 and #1455 are merged.

  6. assigned and unassigned on Jul 7, 2021
  7. modified the milestones: weeks26-27, Sprint 4 on Jul 7, 2021
  8. removed
    backlog
    on Jul 7, 2021
  9. sechkova commented on Jul 9, 2021

    @sechkova
    Contributor

    I had partial success when trying to enable mypy for ngclient: #1489

    Two main issues remain:

    1. mypy cannot figure out our intentions to instantiate Signed subclasses
    2. mypy considers some values as potentially "None" at places where we think we have ensured that this is not possible (esp in trusted_metadata_set where we know the state but mypy doesn't)

    see https://github.com/theupdateframework/tuf/pull/1489/checks?check_run_id=3028663485

    The first issue could be resolved by #1457 or by adding type hints for all attributes missing in the base class (doesn't feel so great). While the second one probably requires case by case decisions.

  10. modified the milestones: Sprint 4, Sprint 5 on Jul 28, 2021
  11. modified the milestones: Sprint 5, Sprint 6 on Aug 18, 2021
  12. jku commented on Aug 18, 2021

    @jku
    MemberAuthor

    this is no longer blocked by missing Metadata generics: I just merged that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions