Codestyle
minecraft-launcher-lib uses PEP8 as it’s codestyle with the following additional rules:
Lines longer than 80 chars are allowed. We are not in the 90s anymore. Any modern screen can display way more than 80 chars per line without scrolling.
All functions must have type annotations
All functions must have docstrings
Check the Codestyle
minecraft-launcher-lib uses flake8 along with the flake8-annotation, the flake8-docstring-checker plugin, and the flake8-assert-finder plugin to do a automatic style check. To get started, install it:
pip install flake8 flake8-annotation flake8-docstring-checker flake8-assert-finder
To run it, open a command line in the root directory of minecraft-launcher-lib and run:
flake8
If it prints nothing, everything is OK. If it prints something, you should fix it.