Closed termac closed 4 weeks ago
Thanks for your contribution!
Looks like tests are failing due to discriminator
that were previously null being overwritten with empty strings. I think it makes more sense to keep these as null, so could you please add a condition to check msg.name.discriminator
is nonempty before using it? Probably makes sense to do the same with msg.name.nickname
.
Would also be good to have some replays that require this new feature added to the test suite. You just need to drop some replay files (just a couple will do) in tests/replays/
, run pytest --update-golden
and commit the resulting json files.
Added a check for empty values and some replays to the test suite. I forgot to run the tests before, sorry for that!
No worries, looks perfect now! I'll bump the version and release it :)
I wanted to parse tournament replay packs and had to make some changes to parse the player nickname in custom games:
PlayerAlt
message instormgate.proto
shroudstone/replay/stormgate_pb2.py
andshroudstone/replay/stormgate_pb2.pyi
withcodegen.sh
shroudstone/replay/parser.py
to fill in player nickname and discrimnator fromPlayerAlt
messagesLet me know if anything needs improvement to merge.