Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upFixes toJson in sc2reader/scripts/sc2json.py #118
Conversation
|
Note: the failing style check in circleci doesn't seem to be from my change
|
|
Thanks for submitting this! I have a few suggestions in order of preference:
I'm not too concerned about test coverage here. I would prefer it, but I can understand if you don't want to put the extra work in to cover something that already isn't covered. And yes, the spellcheck appears to be unrelated to your code. Since you hit on it, can you fix the spelling on that as well? |
try:
factory.register_plugin(
"Replay", toJSON(encoding=args.encoding, indent=args.indent)
) # legacy Python
except TypeError:
factory.register_plugin("Replay", toJSON(indent=args.indent))However, #85 (comment) Python 2 died 188 days ago on 1/1/2020. |
|
True, but I don't see why we should drop support if it is convenient enough, and in this case, it appears to be so. On this issue, if the |
|
|
The typo is fixed in #119 |
|
Sorry for the late reply only catching up on this conversation now - to clarify though:
@cclauss fixed the typo (thanks!) - I added that as a commit to this PR |
|
LGTM |
|
Thanks for the change! |
rohits47 commentedJul 6, 2020
Fixes
toJsoninsc2reader/scripts/sc2json.pyto not take encoding - encoding is not a kwarg in json.dumps in python3.7 . I'm not sure how to add tests for cli/argparse code and there don't seem to be existing tests for that part, so I hope that's ok? Also not sure about the guidelines for python2/python3 support, but this was run with python3.7.8 which should be the current main stable supported version AFAIK. I tried this patch out locally and it seemed to work for me:before:
after:
Please let me know if there's a better way I should be doing this, or if there are any other issues with the PR. Thanks!