Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert scripts to Python3 #207

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

christhompson
Copy link
Contributor

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.

Copy link
Collaborator

@lgarron lgarron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Python changes look like they don't affect functionality, thanks for keeping this project modern. :-D

@nharper
Copy link
Collaborator

nharper commented Nov 9, 2022

1f19c7f 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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants