hstspreload.org
hstspreload.org copied to clipboard
Convert scripts to Python3
This updates the Python scripts in scripts/ to be Python3 compatible, and does some general cleanup. This also adds a new .pylintrc file and .style.yapf file so pylint and yapf will work and apply the appropriate style guide ("Google Python Style") to make it easier to check style issues in the future. The biggest style change is moving away from printf-style format strings to Python f"" format strings, and changing one "tricky" way of convincing the JSON parser to handle an object to a slightly different style (and adding a comment).
I've tested the updated scripts by manually running update_bulk_preloaded.py and by running through the playbook at https://github.com/chromium/hstspreload.org/wiki/Preload-List-Processes#updating-bulk-hsts-entries to test roll_preload_list.py.
https://github.com/chromium/hstspreload.org/commit/1f19c7f3b0e3b988cf349598e9eb4ed09e3863d0 made some changes to support python3, so this PR has merge conflicts with that commit. If this PR is still relevant (the .pylintrc and .style.yapf probably still are relevant), can you rebase it?