derrix060 / onedriveClient

A Microsoft OneDrive and OneDrive for Business client for Linux, written in Python3.
MIT License
65 stars 10 forks source link

Type Hinting #25

Open modelmat opened 5 years ago

modelmat commented 5 years ago

Since Python 3.5 (PEP 484), type hinting has been a thing:

def greeting(name: str) -> str:
    return 'Hello ' + name

This allows IDE and code editors to add members to intellisense / autocompletes to better code.

This library supposedly supports Python 3+, so should we limit to 3.5+ (which is reasonable)?

derrix060 commented 5 years ago

This PEP has the state Provisional so can be rejected or withdrawn... I don't see this as a think that "needs" to be done, but something "nice to have".

modelmat commented 5 years ago

It's something nice to have. It's not even intended as a library to use a module, so even less. It just helps with development. However, I noticed that PEP 3107 was added in 3.0, meaning that these are valid in any python version, though do not hold the same meaning from 3.0-3.4 as they do in 3.5+.