marcusbuffett / command-line-chess

A python program to play chess against an AI in the terminal.
MIT License
500 stars 162 forks source link

Configure `mypy` and type annotate the code #35

Closed ClasherKasten closed 2 years ago

ClasherKasten commented 2 years ago

The code is untyped, what doesnn't cause problems, but type code would make it easier for people to work with the code. (This is an feature what would be kinda cool if we provide something like an API in the future to make it more hackable)

Tasks which have to be done to accomplish this would be:

aaaandrzej commented 2 years ago

Hey, good idea, I'm happy to do to this next week.

ClasherKasten commented 2 years ago

Hi @aaaandrzej,

very cool that you want to work on this. I just want to mention that some parts of the code could be rewritten/deprecated while making the AI faster (as discussed in #32). Right now I'm deepening my knowledge in the topics written down in the issue and try to provide a concrete plan (or even an implementation) as soon as possible.

aaaandrzej commented 2 years ago

OK, understood, and thanks for the heads up. Don't worry if the code changes while I'll be adding mypy related stuff, the codebase isn't big so it shouldn't be an issue to redo anything if needed.

One question on this occasion though, how do you feel about PEP8? I could probably do some renames while working on this issue if you're OK with that. I mean mostly function names to follow snake_case instead of camelCase as described in PEP8.

ClasherKasten commented 2 years ago

I didn't thought about PEP8 in this project much till now. But I have no problems with you changing some names. Please just reference issue #33 when opening the PR.