Closed twizmwazin closed 3 months ago
Hi, I think None
returns for class constructor __init__
are the "obvious" stuff that should be manually corrected
What do you mean? In python __init__
always return None. See here
Oh sorry for the ambiguous words XD
I mean maybe we don't need a -> None
annotation for __init__
, while autotype seems to add such annotation for every __init__
I made that choice intentionally, autotype only adds what you tell it to. The goal is to type annotate everything in the end and run it through a static type checker in CI (mypy). While perhaps it could be inferred, I’ve seen enough errors in magic methods not returning the correct type that I think it’s justified.
Understood, thanks for your explanation!
This branch uses the autotype project to add a lot of type annotations to angr management. The goal here is to improve type coverage, and to avoid spending lots of time annotating the "obvious" stuff, but still ensuring that mypy has enough information to usefully report errors. This approach used with this tool is fairly conservative, and while it will have some errors that will need to be manually corrected, overall it should be an improvement.