Conversation
trexfeathers
left a comment
There was a problem hiding this comment.
In some places the new formatting looks really horrible, is less readable and seems gratuitous - see the specific sections I have marked. Is there a configuration we can use to make Black less zealous?
| ( | ||
| "first_validity_time", | ||
| ( | ||
| 21, | ||
| 22, | ||
| 23, | ||
| 24, | ||
| 25, | ||
| 26, | ||
| 27, | ||
| ), | ||
| ), | ||
| ( | ||
| "last_validity_time", | ||
| ( | ||
| 28, | ||
| 29, | ||
| 30, | ||
| 31, | ||
| 32, | ||
| 33, | ||
| 34, | ||
| ), | ||
| ), | ||
| ( | ||
| "misc_validity_time", | ||
| ( | ||
| 35, | ||
| 36, | ||
| 37, | ||
| 38, | ||
| 39, | ||
| 40, | ||
| 41, | ||
| ), | ||
| ), | ||
| ( | ||
| "integer_constants", | ||
| ( | ||
| 100, | ||
| 101, | ||
| ), | ||
| ), | ||
| ( | ||
| "real_constants", | ||
| ( | ||
| 105, | ||
| 106, | ||
| ), | ||
| ), | ||
| ( | ||
| "level_dependent_constants", | ||
| ( | ||
| 110, | ||
| 111, | ||
| 112, | ||
| ), | ||
| ), | ||
| ( | ||
| "row_dependent_constants", | ||
| ( | ||
| 115, | ||
| 116, | ||
| 117, | ||
| ), | ||
| ), | ||
| ( | ||
| "column_dependent_constants", | ||
| ( | ||
| 120, | ||
| 121, | ||
| 122, | ||
| ), | ||
| ), | ||
| ( | ||
| "fields_of_constants", | ||
| ( | ||
| 125, | ||
| 126, | ||
| 127, | ||
| ), | ||
| ), | ||
| ( | ||
| "extra_constants", | ||
| ( | ||
| 130, | ||
| 131, | ||
| ), | ||
| ), | ||
| ( | ||
| "temp_historyfile", | ||
| ( | ||
| 135, | ||
| 136, | ||
| ), | ||
| ), | ||
| ( | ||
| "compressed_field_index1", | ||
| ( | ||
| 140, | ||
| 141, | ||
| ), | ||
| ), | ||
| ( | ||
| "compressed_field_index2", | ||
| ( | ||
| 142, | ||
| 143, | ||
| ), | ||
| ), | ||
| ( | ||
| "compressed_field_index3", | ||
| ( | ||
| 144, | ||
| 145, | ||
| ), | ||
| ), | ||
| ( | ||
| "lookup_table", | ||
| ( | ||
| 150, | ||
| 151, | ||
| 152, | ||
| ), | ||
| ), | ||
| ("total_prognostic_fields", (153,)), | ||
| ("data", (160, 161, 162,)), | ||
| ( | ||
| "data", | ||
| ( | ||
| 160, | ||
| 161, | ||
| 162, | ||
| ), | ||
| ), |
There was a problem hiding this comment.
Almost wondering if it's a bug in black? Would anyone really choose this?
There was a problem hiding this comment.
@bjlittle will likely be able to explain all once he pushes the fixing commit. He does know what's wrong
| ( | ||
| "lbrsvd", | ||
| ( | ||
| 34, | ||
| 35, | ||
| 36, | ||
| 37, | ||
| ), | ||
| ), | ||
| ("lbsrce", (38,)), | ||
| ("lbuser", (39, 40, 41, 42, 43, 44, 45,)), | ||
| ("brsvd", (46, 47, 48, 49,)), | ||
| ( | ||
| "lbuser", | ||
| ( | ||
| 39, | ||
| 40, | ||
| 41, | ||
| 42, | ||
| 43, | ||
| 44, | ||
| 45, | ||
| ), | ||
| ), | ||
| ( | ||
| "brsvd", | ||
| ( | ||
| 46, | ||
| 47, | ||
| 48, | ||
| 49, | ||
| ), | ||
| ), |
| ( | ||
| "lbrsvd", | ||
| ( | ||
| 34, | ||
| 35, | ||
| 36, | ||
| 37, | ||
| ), | ||
| ), | ||
| ("lbsrce", (38,)), | ||
| ("lbuser", (39, 40, 41, 42, 43, 44, 45,)), | ||
| ("brsvd", (46, 47, 48, 49,)), | ||
| ( | ||
| "lbuser", | ||
| ( | ||
| 39, | ||
| 40, | ||
| 41, | ||
| 42, | ||
| 43, | ||
| 44, | ||
| 45, | ||
| ), | ||
| ), | ||
| ( | ||
| "brsvd", | ||
| ( | ||
| 46, | ||
| 47, | ||
| 48, | ||
| 49, | ||
| ), | ||
| ), |
| np.logical_and( | ||
| mask_invert[ | ||
| :-1, | ||
| ], | ||
| diffs_along_y, | ||
| ) |
| lat_cube = next( | ||
| self.cube.slices( | ||
| [ | ||
| "grid_latitude", | ||
| ] | ||
| ) | ||
| ) |
| points=[ | ||
| 15, | ||
| ], |
| len( | ||
| set(test_date_ints), | ||
| ), |
| self.assertEqual( | ||
| shape, | ||
| ( | ||
| 2, | ||
| 3, | ||
| ), | ||
| ) |
| self.assertEqual( | ||
| shape, | ||
| ( | ||
| 2, | ||
| 3, | ||
| ), | ||
| ) |
| Index[ | ||
| (2, 0, 1), | ||
| ], |
|
@trexfeathers Yeah, I tend to agree... I am slightly upset with its choices... I'll tinker under the hood and experiment a little with what controls black provides to see if it alleviates these changes. |
|
@trexfeathers I'm closing this in favour of #3866... it just make life easier 😉 |
🚀 Pull Request
Description
This PR bumps the version of the
blackpre-commit hook, and adds format changes to files for the new version standard.Consult Iris pull request check list