secure-systems-lab / securesystemslib

Cryptographic and general-purpose routines for Secure Systems Lab projects at NYU
MIT License
48 stars 49 forks source link

Update annotations to python 3.9 #887

Closed jku closed 1 month ago

jku commented 1 month ago

886 is merged so we could start using "new" annotations in the code base. Fixing this requires no securesystemslib knowledge but understanding Python annotation basics is required.

Python 3.9 allows annotations using standard library containers (so e.g. dict instead of typing.Dict). In practice this should work:

jku commented 1 month ago
  • Change all uses of Optional[str] to str | None ...

Actually this might be in 3.10 only -- if that is true then we don't want to change it yet