)]}'
{"storlets/sbus/datagram.py":[{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"5e8d2124a1aa521e2e6ef85afc1d79da753ec9d0","unresolved":false,"context_lines":[{"line_number":158,"context_line":"        expected_fd_types \u003d self.required_fd_types + \\"},{"line_number":159,"context_line":"            self.get_optional_fd_types(given_fd_types)"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"        if given_fd_types !\u003d expected_fd_types:"},{"line_number":162,"context_line":"            raise ValueError(\u0027Fd type mismatch given_fd_types:%s \\"},{"line_number":163,"context_line":"                             expected_fd_types:%s\u0027 %"},{"line_number":164,"context_line":"                             (given_fd_types, expected_fd_types))"}],"source_content_type":"text/x-python","patch_set":8,"id":"3fa7e38b_23704fdc","line":161,"updated":"2019-09-25 02:55:25.000000000","message":"This looks a little weird because the expected_fd_types is generated by given_fd_types and get_optional_fd_types doesn\u0027t use the actual list, just nothing or length of given_fd_types.\n\nIt seems, given_fd_types is also incomprehensible, maybe?\n\nIf we want to check the optional list strictly, I bet to implement _check_optional_fd_types, instead, then pass the rest of given fds then check the type is in expected ones.","commit_id":"bc37bc125a5afa0e4b2c8c9c48a8d645b42a1e12"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"1151972154753221307c007135dc7c202f3f9ba5","unresolved":false,"context_lines":[{"line_number":158,"context_line":"        expected_fd_types \u003d self.required_fd_types + \\"},{"line_number":159,"context_line":"            self.get_optional_fd_types(given_fd_types)"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"        if given_fd_types !\u003d expected_fd_types:"},{"line_number":162,"context_line":"            raise ValueError(\u0027Fd type mismatch given_fd_types:%s \\"},{"line_number":163,"context_line":"                             expected_fd_types:%s\u0027 %"},{"line_number":164,"context_line":"                             (given_fd_types, expected_fd_types))"}],"source_content_type":"text/x-python","patch_set":8,"id":"3fa7e38b_4639d9a1","line":161,"in_reply_to":"3fa7e38b_23704fdc","updated":"2019-09-25 03:51:43.000000000","message":"\u003e This looks a little weird because the expected_fd_types is generated by given_fd_types and ...\n\nI selected current option because of the following points.\n\n1. \nIf we have another method to validate optional fds, we can not easily show the list of whole fds. I believe showing whole list can make it easier to debug incorrect fd list.\n\n2.\nThe reason why we currently pass given_fd_types is that we need the length of fds to calculate the number of extra input fds.\nIMO this should be replaced by parameters (like extra_input_num, extra_output_num), which makes much more sense to have single validation here, but now I\u0027ll leave it for future work at the moment.","commit_id":"bc37bc125a5afa0e4b2c8c9c48a8d645b42a1e12"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"dd786a2da8ec899e96ac721e8c71490b4951d780","unresolved":false,"context_lines":[{"line_number":158,"context_line":"        expected_fd_types \u003d self.required_fd_types + \\"},{"line_number":159,"context_line":"            self.get_optional_fd_types(given_fd_types)"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"        if given_fd_types !\u003d expected_fd_types:"},{"line_number":162,"context_line":"            raise ValueError(\u0027Fd type mismatch given_fd_types:%s \\"},{"line_number":163,"context_line":"                             expected_fd_types:%s\u0027 %"},{"line_number":164,"context_line":"                             (given_fd_types, expected_fd_types))"}],"source_content_type":"text/x-python","patch_set":8,"id":"3fa7e38b_c696294d","line":161,"in_reply_to":"3fa7e38b_4639d9a1","updated":"2019-09-25 04:28:57.000000000","message":"My point is that we don\u0027t have to check everything in the parent class. i.e. the inherited child class may assert the optional args by overriding this method. (or add general _check_optional_fd_types called by this method).\n\nwe can transfer the responsibility to the child class.","commit_id":"bc37bc125a5afa0e4b2c8c9c48a8d645b42a1e12"}]}
