sportsipy icon indicating copy to clipboard operation
sportsipy copied to clipboard

Support Python Typing

Open roclark opened this issue 3 years ago • 6 comments

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.

roclark avatar Sep 29 '20 01:09 roclark

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

raisultan avatar Sep 29 '20 05:09 raisultan

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

srshobhit72 avatar Sep 29 '20 05:09 srshobhit72

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?

chetnaaggarwal-ca avatar Sep 30 '20 02:09 chetnaaggarwal-ca

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!

roclark avatar Sep 30 '20 14:09 roclark

@roclark, thank you!

raisultan avatar Oct 01 '20 03:10 raisultan

@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)?

raisultan avatar Oct 01 '20 11:10 raisultan