)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"a26dbe7d9c7b6156f55fed5c071cf7df439ef404","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"6623107b_2848cd7f","updated":"2024-05-23 18:19:26.000000000","message":"I mean we can do this if we want; I don\u0027t really think we need to","commit_id":"92819e50e745137254802b32b385b77cfe7adde4"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"273dc46a502bfc9bd389b62484bf7aa092a40d1e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"a21c8f59_f8efb2e1","in_reply_to":"6623107b_2848cd7f","updated":"2024-05-23 19:19:35.000000000","message":"I\u0027m inclined to agree. One way I\u0027m thinking about it: if we were to drop py2 support today *and* commit to adding type annotations wherever possible, what kind of signature would we want?\n```\ndef non_negative_int(value: str) -\u003e int:\n```\nseems pretty darn defensible, especially in a module all about reading \u0026 using *configs*.\n```\ndef non_negative_int(value: Union[str, int]) -\u003e int:\n```\nmight be justifiable as a matter of convenience, though the fact that it also allows `bool`s is kinda weird.\n```\ndef non_negative_int(value: Union[str, int, float]) -\u003e int:\n```\nlooks a little insane.\n\nI don\u0027t know that I want to go so far as to *enforcing* the allowed types (and presumably raising `TypeError`, not `ValueError`, if they\u0027re not allowed), but leaving unsupported types untested seems pretty reasonable -- so I might be partial towards taking out the existing float tests.","commit_id":"92819e50e745137254802b32b385b77cfe7adde4"}],"test/unit/common/utils/test_config.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"a26dbe7d9c7b6156f55fed5c071cf7df439ef404","unresolved":true,"context_lines":[{"line_number":102,"context_line":"        with self.assertRaises(ValueError) as cm:"},{"line_number":103,"context_line":"            config.non_negative_int(-1.1)"},{"line_number":104,"context_line":"        self.assertEqual("},{"line_number":105,"context_line":"            \u0027Value must be a non-negative integer, not \"-1\".\u0027,"},{"line_number":106,"context_line":"            str(cm.exception))"},{"line_number":107,"context_line":"        with self.assertRaises(ValueError) as cm:"},{"line_number":108,"context_line":"            config.non_negative_int(\u00271.1\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"051c1731_d3253d24","line":105,"updated":"2024-05-23 18:19:26.000000000","message":"it\u0027s *generally* a bad idea to assert assertions on non requirements\n\nthis path leads to the dark side of the bike shed","commit_id":"92819e50e745137254802b32b385b77cfe7adde4"}]}
