roclark / sportsipy

A free sports API written for python
MIT License
482 stars 187 forks source link

Support Python Typing #488

Open roclark opened 3 years ago

roclark commented 3 years ago

Is your feature request related to a problem? Please describe. To better expand the usability of the API and helping in determining users pass the correct inputs, Python's typing should be supported for all functions, methods, and classes.

Describe the solution you'd like All functions should include a type for the parameters and returns, such as:

def multiply_numbers(first_num: float, second_num: float) -> float:
    return first_num * second_num

Describe alternatives you've considered The current method of documenting the expected types in the functions and methods works, but users can still input any variable type which can cause issues and confusion.

Additional context More information on Python's type hints can be found here.

raisultan commented 3 years ago

hi 👋, @roclark I would like to work on this issue, can you assign it to me?

srshobhit72 commented 3 years ago

Hello @roclark , I would like to contribute on this, can you please assign this to me?

chetnaaggarwal-ca commented 3 years ago

hello @roclark , I would like to work on this issue as i am having good knowledge about python . Can you Please assign this to me?

roclark commented 3 years ago

Hello all! Thanks for all of the volunteers! 😃 I would love to have everyone participate, but for fairness, I think it would be best to let @raisultan take care of this since they were the first to comment. Of course, you all are more than welcome to collaborate together if desired, especially since this will be a very large update to get the typing changed for all functions and methods. Thanks again for the enthusiasm! I look forward to this update!

raisultan commented 3 years ago

@roclark, thank you!

raisultan commented 3 years ago

@roclark, need some clarifications 😅. First of all, is it convenient for you to review the type annotation of entire project as single PR or its better for me to split them up by modules? And, I see some incorrect descriptions in docstrings, what should I do with them (e.g. leave todos, fix them, etc)?