You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ngclient: type annotations review and mypy integration #1409
I had partial success when trying to enable mypy for ngclient: #1489
Two main issues remain:
mypy cannot figure out our intentions to instantiate Signed subclasses
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)
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.
Activity
jku commentedon Jun 30, 2021
I was planning to handle this but will push forward: this makes sense after both #1408 and #1455 are merged.
sechkova commentedon Jul 9, 2021
I had partial success when trying to enable
mypyforngclient: #1489Two main issues remain:
mypycannot figure out our intentions to instantiate Signedsubclassesmypyconsiders 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.
jku commentedon Aug 18, 2021
this is no longer blocked by missing Metadata generics: I just merged that