pytorch-accelerated icon indicating copy to clipboard operation
pytorch-accelerated copied to clipboard

Add type hints

Open ClementPinard opened this issue 2 years ago • 3 comments

Add type hints to the library. It makes it much easier to work with VSCode since you get the autocompletion.

Notes :

  • type hints are 3.8 style (aka very verbose) and might be much prettier if converted to 3.10 style
  • Some automatic formatting have been added, I will remove it
  • This is not typechecked by pyright or mypy. the type hints are only for information purpose. Maybe this could be put in a stub file instead ?

ClementPinard avatar Aug 04 '23 21:08 ClementPinard

Hi, is this PR considered ? Helped me a lot for auto completion, and would be nice to have it included in the pip package (which could use an update on HF's acclerate version dependency btw)

Cheers, Clément

ClementPinard avatar Nov 13 '23 17:11 ClementPinard

Hi @ClementPinard, I believe that @bepuca was looking at this

Chris-hughes10 avatar Nov 13 '23 17:11 Chris-hughes10

Hi thanks @Chris-hughes10 don't hesistate to ping me if some changes are needed

ClementPinard avatar Nov 16 '23 10:11 ClementPinard