pw_presubmit: Auto fix unsorted-dict-items

Bug: 340637744
Change-Id: I2f2aba61c1381d1e54ad654773e6b6b947176603
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/209881
Commit-Queue: Ted Pudlik <tpudlik@google.com>
Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.com>
Reviewed-by: Armando Montanez <amontanez@google.com>
diff --git a/pw_presubmit/py/bazel_format_test.py b/pw_presubmit/py/bazel_format_test.py
index 206a5fe..daa1da8 100644
--- a/pw_presubmit/py/bazel_format_test.py
+++ b/pw_presubmit/py/bazel_format_test.py
@@ -61,6 +61,7 @@
                             'native-build',
                             'same-origin-load',
                             'out-of-order-load',
+                            'unsorted-dict-items',
                         )
                     ),
                 )
@@ -96,6 +97,7 @@
                             'native-build',
                             'same-origin-load',
                             'out-of-order-load',
+                            'unsorted-dict-items',
                         )
                     ),
                 )
@@ -136,6 +138,7 @@
                                 'native-build',
                                 'same-origin-load',
                                 'out-of-order-load',
+                                'unsorted-dict-items',
                             )
                         ),
                         str(file_to_fix),
@@ -158,6 +161,7 @@
                                 'native-build',
                                 'same-origin-load',
                                 'out-of-order-load',
+                                'unsorted-dict-items',
                             )
                         ),
                         str(malformed_file),
@@ -180,6 +184,7 @@
                                 'native-build',
                                 'same-origin-load',
                                 'out-of-order-load',
+                                'unsorted-dict-items',
                             )
                         ),
                         str(malformed_file),
diff --git a/pw_presubmit/py/pw_presubmit/format/bazel.py b/pw_presubmit/py/pw_presubmit/format/bazel.py
index 9b6f530..a66f607 100644
--- a/pw_presubmit/py/pw_presubmit/format/bazel.py
+++ b/pw_presubmit/py/pw_presubmit/format/bazel.py
@@ -33,6 +33,7 @@
         'native-build',
         'same-origin-load',
         'out-of-order-load',
+        'unsorted-dict-items',
     )
 
     def __init__(
diff --git a/pw_presubmit/py/pw_presubmit/format/test_data/bazel_test_data.bazel b/pw_presubmit/py/pw_presubmit/format/test_data/bazel_test_data.bazel
index 7264fc8..a77cfc5 100644
--- a/pw_presubmit/py/pw_presubmit/format/test_data/bazel_test_data.bazel
+++ b/pw_presubmit/py/pw_presubmit/format/test_data/bazel_test_data.bazel
@@ -21,9 +21,12 @@
 
 proto_library(
     name = "foo_proto",
-    srcs = [
-        "foo.proto"
-    ],
+    srcs = select({
+        "//conditions:default": [
+            "foo.proto"
+        ],
+        "//mymodule:condition": [],
+    }),
 )
 
 py_proto_library(
diff --git a/pw_presubmit/py/pw_presubmit/format/test_data/bazel_test_data_golden.bazel b/pw_presubmit/py/pw_presubmit/format/test_data/bazel_test_data_golden.bazel
index a382b7e..4e083dd 100644
--- a/pw_presubmit/py/pw_presubmit/format/test_data/bazel_test_data_golden.bazel
+++ b/pw_presubmit/py/pw_presubmit/format/test_data/bazel_test_data_golden.bazel
@@ -16,9 +16,12 @@
 
 proto_library(
     name = "foo_proto",
-    srcs = [
-        "foo.proto",
-    ],
+    srcs = select({
+        "//mymodule:condition": [],
+        "//conditions:default": [
+            "foo.proto",
+        ],
+    }),
 )
 
 py_proto_library(