)]}'
{"tripleo-get-hash/tripleo_get_hash.py":[{"author":{"_account_id":10969,"name":"Shnaidman Sagi (Sergey)","display_name":"Shnaidman Sagi","email":"sshnaidm@redhat.com","username":"sergsh"},"change_message_id":"c0d3df201e6927d7cf601ab41edd80d29ee0e4d3","unresolved":true,"context_lines":[{"line_number":127,"context_line":"        dlrn_url \u003d module.params.get(\u0027dlrn_url\u0027)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        hash_result \u003d TripleOHashInfo(os_version, release, component, tag,"},{"line_number":130,"context_line":"                                      {\u0027dlrn_url\u0027: dlrn_url}, )"},{"line_number":131,"context_line":"        result[\u0027commit_hash\u0027] \u003d hash_result.commit_hash"},{"line_number":132,"context_line":"        result[\u0027distro_hash\u0027] \u003d hash_result.distro_hash"},{"line_number":133,"context_line":"        result[\u0027full_hash\u0027] \u003d hash_result.full_hash"}],"source_content_type":"text/x-python","patch_set":2,"id":"4f60d6fd_1e020e87","line":130,"range":{"start_line":130,"start_character":38,"end_line":130,"end_character":59},"updated":"2021-07-07 16:16:53.000000000","message":"a good practice is to use parameter name, like:\n  config\u003d{...}\nnot to rely on argument order","commit_id":"6c5f91758befff10c8044db0ed51d56f5aa4c2a7"},{"author":{"_account_id":10969,"name":"Shnaidman Sagi (Sergey)","display_name":"Shnaidman Sagi","email":"sshnaidm@redhat.com","username":"sergsh"},"change_message_id":"c0d3df201e6927d7cf601ab41edd80d29ee0e4d3","unresolved":true,"context_lines":[{"line_number":127,"context_line":"        dlrn_url \u003d module.params.get(\u0027dlrn_url\u0027)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        hash_result \u003d TripleOHashInfo(os_version, release, component, tag,"},{"line_number":130,"context_line":"                                      {\u0027dlrn_url\u0027: dlrn_url}, )"},{"line_number":131,"context_line":"        result[\u0027commit_hash\u0027] \u003d hash_result.commit_hash"},{"line_number":132,"context_line":"        result[\u0027distro_hash\u0027] \u003d hash_result.distro_hash"},{"line_number":133,"context_line":"        result[\u0027full_hash\u0027] \u003d hash_result.full_hash"}],"source_content_type":"text/x-python","patch_set":2,"id":"46c95249_d2ad5ae8","line":130,"range":{"start_line":130,"start_character":61,"end_line":130,"end_character":62},"updated":"2021-07-07 16:16:53.000000000","message":"seems like redundant comma and space","commit_id":"6c5f91758befff10c8044db0ed51d56f5aa4c2a7"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"6fd211f00298638fa1cb9b3c51c62093f424d15c","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        dlrn_url \u003d module.params.get(\u0027dlrn_url\u0027)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        hash_result \u003d TripleOHashInfo(os_version, release, component, tag,"},{"line_number":130,"context_line":"                                      {\u0027dlrn_url\u0027: dlrn_url}, )"},{"line_number":131,"context_line":"        result[\u0027commit_hash\u0027] \u003d hash_result.commit_hash"},{"line_number":132,"context_line":"        result[\u0027distro_hash\u0027] \u003d hash_result.distro_hash"},{"line_number":133,"context_line":"        result[\u0027full_hash\u0027] \u003d hash_result.full_hash"}],"source_content_type":"text/x-python","patch_set":2,"id":"06d0e66f_3805ce8f","line":130,"range":{"start_line":130,"start_character":61,"end_line":130,"end_character":62},"in_reply_to":"46c95249_d2ad5ae8","updated":"2021-07-08 12:49:27.000000000","message":"Ack though functionally this is OK for python","commit_id":"6c5f91758befff10c8044db0ed51d56f5aa4c2a7"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"6fd211f00298638fa1cb9b3c51c62093f424d15c","unresolved":true,"context_lines":[{"line_number":127,"context_line":"        dlrn_url \u003d module.params.get(\u0027dlrn_url\u0027)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        hash_result \u003d TripleOHashInfo(os_version, release, component, tag,"},{"line_number":130,"context_line":"                                      {\u0027dlrn_url\u0027: dlrn_url}, )"},{"line_number":131,"context_line":"        result[\u0027commit_hash\u0027] \u003d hash_result.commit_hash"},{"line_number":132,"context_line":"        result[\u0027distro_hash\u0027] \u003d hash_result.distro_hash"},{"line_number":133,"context_line":"        result[\u0027full_hash\u0027] \u003d hash_result.full_hash"}],"source_content_type":"text/x-python","patch_set":2,"id":"7d79b549_a8d38c8b","line":130,"range":{"start_line":130,"start_character":38,"end_line":130,"end_character":59},"in_reply_to":"4f60d6fd_1e020e87","updated":"2021-07-08 12:49:27.000000000","message":"ok","commit_id":"6c5f91758befff10c8044db0ed51d56f5aa4c2a7"}],"tripleo-get-hash/tripleo_get_hash/tripleo_hash_info.py":[{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"8bfa996175eb5791bad152b0aff1d53da8554a42","unresolved":true,"context_lines":[{"line_number":132,"context_line":"                logging.error(error_str)"},{"line_number":133,"context_line":"                raise exc.TripleOHashInvalidConfig(error_str)"},{"line_number":134,"context_line":"            # if the passed config contains the key then use that value"},{"line_number":135,"context_line":"            if passed_config.get(k):"},{"line_number":136,"context_line":"                result_config[k] \u003d passed_config[k]"},{"line_number":137,"context_line":"            else:"},{"line_number":138,"context_line":"                result_config[k] \u003d loaded_config[k]"}],"source_content_type":"text/x-python","patch_set":1,"id":"f58dd2b9_ce43f230","line":135,"range":{"start_line":135,"start_character":16,"end_line":135,"end_character":23},"updated":"2021-06-09 10:05:45.000000000","message":"this needs fixing \n\ntests++\n\nso if the value is \u0027\u0027 then it still tries to use it\n\neven if we use \u0027update\u0027 method\n\n\u003e\u003e\u003e diction\n{\u0027a\u0027: \u00271\u0027}\n\u003e\u003e\u003e dictionb\u003d{\"a\": \"\"}\n\u003e\u003e\u003e diction.update(dictionb)\n\u003e\u003e\u003e diction\n{\u0027a\u0027: \u0027\u0027}","commit_id":"5dafb8b967eeb7e39a30e53e22109ffc0e655224"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"23b41fb9f143d27b5cffe0cf446f5f48b3e57e06","unresolved":true,"context_lines":[{"line_number":132,"context_line":"                logging.error(error_str)"},{"line_number":133,"context_line":"                raise exc.TripleOHashInvalidConfig(error_str)"},{"line_number":134,"context_line":"            # if the passed config contains the key then use that value"},{"line_number":135,"context_line":"            if passed_config.get(k):"},{"line_number":136,"context_line":"                result_config[k] \u003d passed_config[k]"},{"line_number":137,"context_line":"            else:"},{"line_number":138,"context_line":"                result_config[k] \u003d loaded_config[k]"}],"source_content_type":"text/x-python","patch_set":1,"id":"a0c5a47b_05d7145f","line":135,"range":{"start_line":135,"start_character":16,"end_line":135,"end_character":23},"in_reply_to":"07de5ab7_ca563ed7","updated":"2021-07-05 12:18:42.000000000","message":"yeah, if the value is an empty element (string, list, dict), it won\u0027t get inside the if clause, unless you specify \"if passed_config.get(k) is not None:\"\nbut seems to be working as you expected right?","commit_id":"5dafb8b967eeb7e39a30e53e22109ffc0e655224"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"90fcba360b5e72f79d72c4d22ac7c3bd81542c45","unresolved":true,"context_lines":[{"line_number":132,"context_line":"                logging.error(error_str)"},{"line_number":133,"context_line":"                raise exc.TripleOHashInvalidConfig(error_str)"},{"line_number":134,"context_line":"            # if the passed config contains the key then use that value"},{"line_number":135,"context_line":"            if passed_config.get(k):"},{"line_number":136,"context_line":"                result_config[k] \u003d passed_config[k]"},{"line_number":137,"context_line":"            else:"},{"line_number":138,"context_line":"                result_config[k] \u003d loaded_config[k]"}],"source_content_type":"text/x-python","patch_set":1,"id":"fe7b10e5_86123812","line":135,"range":{"start_line":135,"start_character":16,"end_line":135,"end_character":23},"in_reply_to":"a0c5a47b_05d7145f","updated":"2021-07-06 16:20:51.000000000","message":"yeah thanks see v2 i added a test case to confirm/check that empty like \u0027\u0027 is ignored","commit_id":"5dafb8b967eeb7e39a30e53e22109ffc0e655224"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"d97f5c4330470e4b40c5c7925104e5184ee51325","unresolved":true,"context_lines":[{"line_number":132,"context_line":"                logging.error(error_str)"},{"line_number":133,"context_line":"                raise exc.TripleOHashInvalidConfig(error_str)"},{"line_number":134,"context_line":"            # if the passed config contains the key then use that value"},{"line_number":135,"context_line":"            if passed_config.get(k):"},{"line_number":136,"context_line":"                result_config[k] \u003d passed_config[k]"},{"line_number":137,"context_line":"            else:"},{"line_number":138,"context_line":"                result_config[k] \u003d loaded_config[k]"}],"source_content_type":"text/x-python","patch_set":1,"id":"07de5ab7_ca563ed7","line":135,"range":{"start_line":135,"start_character":16,"end_line":135,"end_character":23},"in_reply_to":"f58dd2b9_ce43f230","updated":"2021-06-09 10:11:36.000000000","message":"hmmm not so sure any more \n\n\u003e\u003e\u003e dictionb\n{\u0027a\u0027: \u0027\u0027}\n\u003e\u003e\u003e if dictionb.get(\u0027a\u0027): \n...   print(\"coud get empty\")\n... \n\u003e\u003e\u003e \n\n\nbut will leave the -1 here until i confirm and possibly update tests","commit_id":"5dafb8b967eeb7e39a30e53e22109ffc0e655224"},{"author":{"_account_id":10969,"name":"Shnaidman Sagi (Sergey)","display_name":"Shnaidman Sagi","email":"sshnaidm@redhat.com","username":"sergsh"},"change_message_id":"c0d3df201e6927d7cf601ab41edd80d29ee0e4d3","unresolved":true,"context_lines":[{"line_number":66,"context_line":"        logger.setLevel(logging.INFO)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    @classmethod"},{"line_number":69,"context_line":"    def load_config(cls, passed_config\u003d{}):"},{"line_number":70,"context_line":"        \"\"\""},{"line_number":71,"context_line":"        This is a class method since we call it from the CLI entrypoint"},{"line_number":72,"context_line":"        before the TripleOHashInfo object is created. The method will first"}],"source_content_type":"text/x-python","patch_set":2,"id":"66f1003d_a30fe241","line":69,"range":{"start_line":69,"start_character":39,"end_line":69,"end_character":41},"updated":"2021-07-07 16:16:53.000000000","message":"it\u0027s a bad practice to initialize a var in this place, use \"passed_config\u003dNone\")","commit_id":"6c5f91758befff10c8044db0ed51d56f5aa4c2a7"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"6fd211f00298638fa1cb9b3c51c62093f424d15c","unresolved":true,"context_lines":[{"line_number":66,"context_line":"        logger.setLevel(logging.INFO)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    @classmethod"},{"line_number":69,"context_line":"    def load_config(cls, passed_config\u003d{}):"},{"line_number":70,"context_line":"        \"\"\""},{"line_number":71,"context_line":"        This is a class method since we call it from the CLI entrypoint"},{"line_number":72,"context_line":"        before the TripleOHashInfo object is created. The method will first"}],"source_content_type":"text/x-python","patch_set":2,"id":"e62f6b9b_96b4d1a3","line":69,"range":{"start_line":69,"start_character":39,"end_line":69,"end_character":41},"in_reply_to":"66f1003d_a30fe241","updated":"2021-07-08 12:49:27.000000000","message":"ok i can rework this but is there something you can point to about the bad practice? i\u0027d be interested in reading more about that - e.g. why is it better to use \u0027None\u0027 here instead of {}?","commit_id":"6c5f91758befff10c8044db0ed51d56f5aa4c2a7"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"b4cdc3d23fcd7b942d0dc2a61b2a65f847dc77da","unresolved":true,"context_lines":[{"line_number":66,"context_line":"        logger.setLevel(logging.INFO)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    @classmethod"},{"line_number":69,"context_line":"    def load_config(cls, passed_config\u003d{}):"},{"line_number":70,"context_line":"        \"\"\""},{"line_number":71,"context_line":"        This is a class method since we call it from the CLI entrypoint"},{"line_number":72,"context_line":"        before the TripleOHashInfo object is created. The method will first"}],"source_content_type":"text/x-python","patch_set":2,"id":"c7e4724e_59c6378d","line":69,"range":{"start_line":69,"start_character":39,"end_line":69,"end_character":41},"in_reply_to":"679bd7a9_da4f489b","updated":"2021-07-08 14:27:52.000000000","message":"thank you via ^^^ i found that as well https://docs.python-guide.org/writing/gotchas/#mutable-default-arguments","commit_id":"6c5f91758befff10c8044db0ed51d56f5aa4c2a7"},{"author":{"_account_id":10969,"name":"Shnaidman Sagi (Sergey)","display_name":"Shnaidman Sagi","email":"sshnaidm@redhat.com","username":"sergsh"},"change_message_id":"9abaff0c2fbfe0312af01fe6ed6ea01f12ba829f","unresolved":true,"context_lines":[{"line_number":66,"context_line":"        logger.setLevel(logging.INFO)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    @classmethod"},{"line_number":69,"context_line":"    def load_config(cls, passed_config\u003d{}):"},{"line_number":70,"context_line":"        \"\"\""},{"line_number":71,"context_line":"        This is a class method since we call it from the CLI entrypoint"},{"line_number":72,"context_line":"        before the TripleOHashInfo object is created. The method will first"}],"source_content_type":"text/x-python","patch_set":2,"id":"679bd7a9_da4f489b","line":69,"range":{"start_line":69,"start_character":39,"end_line":69,"end_character":41},"in_reply_to":"e62f6b9b_96b4d1a3","updated":"2021-07-08 13:00:58.000000000","message":"Sure, look for \"default mutable parameter in python\", like:\nhttps://florimond.dev/en/posts/2018/08/python-mutable-defaults-are-the-source-of-all-evil/\nhttps://stackoverflow.com/questions/26320899/why-is-the-empty-dictionary-a-dangerous-default-value-in-python\n\netc","commit_id":"6c5f91758befff10c8044db0ed51d56f5aa4c2a7"},{"author":{"_account_id":10969,"name":"Shnaidman Sagi (Sergey)","display_name":"Shnaidman Sagi","email":"sshnaidm@redhat.com","username":"sergsh"},"change_message_id":"c0d3df201e6927d7cf601ab41edd80d29ee0e4d3","unresolved":true,"context_lines":[{"line_number":84,"context_line":"        :raises TripleOHashInvalidConfig for missing keys in config.yaml"},{"line_number":85,"context_line":"        :return: a config dictionary with the keys in constants.CONFIG_KEYS"},{"line_number":86,"context_line":"        \"\"\""},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        def _check_read_file(filepath):"},{"line_number":89,"context_line":"            if os.path.isfile(filepath) and os.access(filepath, os.R_OK):"},{"line_number":90,"context_line":"                return True"}],"source_content_type":"text/x-python","patch_set":2,"id":"f67c91c1_2d48c9af","line":87,"updated":"2021-07-07 16:16:53.000000000","message":"And here kind of \n\n  passed_config \u003d passed_config or {}","commit_id":"6c5f91758befff10c8044db0ed51d56f5aa4c2a7"},{"author":{"_account_id":10969,"name":"Shnaidman Sagi (Sergey)","display_name":"Shnaidman Sagi","email":"sshnaidm@redhat.com","username":"sergsh"},"change_message_id":"c0d3df201e6927d7cf601ab41edd80d29ee0e4d3","unresolved":true,"context_lines":[{"line_number":138,"context_line":"                result_config[k] \u003d loaded_config[k]"},{"line_number":139,"context_line":"        return result_config"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"    def __init__(self, os_version, release, component, tag, config\u003d{}):"},{"line_number":142,"context_line":"        \"\"\"Create a new TripleOHashInfo object"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"        :param os_version: The OS and version e.g. centos8"}],"source_content_type":"text/x-python","patch_set":2,"id":"6d222d24_723be204","line":141,"range":{"start_line":141,"start_character":60,"end_line":141,"end_character":69},"updated":"2021-07-07 16:16:53.000000000","message":"ditto\n\n  config\u003dNone","commit_id":"6c5f91758befff10c8044db0ed51d56f5aa4c2a7"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"6fd211f00298638fa1cb9b3c51c62093f424d15c","unresolved":false,"context_lines":[{"line_number":138,"context_line":"                result_config[k] \u003d loaded_config[k]"},{"line_number":139,"context_line":"        return result_config"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"    def __init__(self, os_version, release, component, tag, config\u003d{}):"},{"line_number":142,"context_line":"        \"\"\"Create a new TripleOHashInfo object"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"        :param os_version: The OS and version e.g. centos8"}],"source_content_type":"text/x-python","patch_set":2,"id":"5dd02ab6_0ab14e86","line":141,"range":{"start_line":141,"start_character":60,"end_line":141,"end_character":69},"in_reply_to":"6d222d24_723be204","updated":"2021-07-08 12:49:27.000000000","message":"Ack","commit_id":"6c5f91758befff10c8044db0ed51d56f5aa4c2a7"}]}
