Clean up & improve makerst.py

Man this file even had some semicolons in it.

I cleaned up the entire file, while it's still pretty ugly it's much better now.
I also added type checks so it passes mypy --strict.
make_type now throws a warning on unresolved type references, which there are a bunch of. I'm not responsible for fixing those though.
Also some more hardening against crashes. For example XML tags without content won't cause crashes now.
Functionality has not been modified as far as I can tell.

Update Makefile for Python 3

Fix ordering issues related to enums & constants
This commit is contained in:
Pieter-Jan Briers
2018-12-26 15:57:51 +01:00
parent 10e9221c49
commit 15a3d16d08
2 changed files with 174 additions and 176 deletions

View File

@ -24,5 +24,5 @@ rst:
rm -rf $(OUTPUTDIR)/rst
mkdir -p $(OUTPUTDIR)/rst
pushd $(OUTPUTDIR)/rst
python $(TOOLSDIR)/makerst.py $(CLASSES)
python3 $(TOOLSDIR)/makerst.py $(CLASSES)
popd