marcelm / dnaio

Efficiently read and write sequencing data from Python
https://dnaio.readthedocs.io/
MIT License
62 stars 9 forks source link

Improve type hints #120

Closed marcelm closed 1 year ago

marcelm commented 1 year ago

CC @fjossandon

marcelm commented 1 year ago

Thanks! I always have to read up on how this is done (in particular overloads) because I do this so rarely.

I also added -> None to the test functions in test_open.py to get them typechecked as well. This required me to drop the deprecated file1 and file2 arguments from the overloads and from those places where they are still used in the tests. I spent way too much time on trying to make it work, but it was easier to just do it this way.

I’ll look into the coverage issue in a separate PR.