botbowl
botbowl copied to clipboard
Add type annotations for functions (PEP 484)
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:
- [x] core/game.py
- [x] core/model.py
- [ ] core/procedure.py
- [x] core/forward_model.py
- [ ] core/load.py
- [ ] core/table.py
- [ ] core/util.py
- [ ] ai/env.py
- [ ] ai/pathfinding.py
- [ ] ai/registry.py
Please assign this issue to me, I am working on basic annotation and should hopefully have a PR up soon for you to review.
@phasenoisepon, great that you've taken on this! Do you need any help or do you have any questions? =)
Haven't had a lot of time to work on this, feel free to assign it to someone else.
Ok, no worries!