[webkit-changes] [WebKit/WebKit] 6dae68: Make the pre-push template be valid Python syntact...

Sam Sneddon noreply at github.com
Tue Dec 3 15:19:09 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6dae686bbeaf583d2b986705ef4c0343259fd201
      https://github.com/WebKit/WebKit/commit/6dae686bbeaf583d2b986705ef4c0343259fd201
  Author: Sam Sneddon <gsnedders at apple.com>
  Date:   2024-12-03 (Tue, 03 Dec 2024)

  Changed paths:
    M Tools/Scripts/hooks/pre-push
    M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/install_hooks.py
    M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/install_hooks_unittest.py

  Log Message:
  -----------
  Make the pre-push template be valid Python syntactically
https://bugs.webkit.org/show_bug.cgi?id=283141

Reviewed by Jonathan Bedard.

This moves SECURITY_LEVELS to being generated prior to being passed to
the template, being styled with pprint.pformat. This isn't ideal
stylistically (as pprint isn't very flexible with its output), but it
doesn't seem worthwhile over-investing in the built formatting.

While we're at it, move SECURITY_LEVELS to always being output in a
deterministic order, allowing us to use the same ordering in both our
tests and in production.

* Tools/Scripts/hooks/pre-push:
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/install_hooks.py:
(InstallHooks.main):
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/install_hooks_unittest.py:
(TestInstallHooks.write_hook):
(TestInstallHooks.test_security_levels):

Canonical link: https://commits.webkit.org/287311@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list