njustesen / botbowl

A Blood Bowl AI framework.
http://www.bot-bowl.com
Other
129 stars 49 forks source link

Add type annotations for functions (PEP 484) #183

Open mrbermell opened 3 years ago

mrbermell commented 3 years ago

PEP 484 specifies a syntax for providing type hints for function arguments and return types:

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

This makes the code more readable and gives more information to linters which can point out inconsistencies.

It would be great to have for all python files in the framework, especially the ones used for bot development. This is a great way to get started working with and understanding the framework. Any help is greatly appreciated!

TODO:

phasenoisepon commented 3 years ago

Please assign this issue to me, I am working on basic annotation and should hopefully have a PR up soon for you to review.

mrbermell commented 3 years ago

@phasenoisepon, great that you've taken on this! Do you need any help or do you have any questions? =)

phasenoisepon commented 3 years ago

Haven't had a lot of time to work on this, feel free to assign it to someone else.

mrbermell commented 3 years ago

Ok, no worries!