)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"2ac613226a6d040acda42a045b05b82cb5242650","unresolved":false,"context_lines":[{"line_number":7,"context_line":"oslo validator"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Implements the Oslo configuration validator,"},{"line_number":10,"context_line":"https://review.openstack.org/#/c/381968/"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Co-Authored-By: Brian Stajkowski \u003cbrian.stajkowski@rackspace.com\u003e"},{"line_number":13,"context_line":"Change-Id: I78d3621afda226f5968963ef408507234dfead4c"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":31,"id":"3a71b18c_6a37df4c","line":10,"range":{"start_line":10,"start_character":0,"end_line":10,"end_character":40},"updated":"2016-12-07 20:20:12.000000000","message":"you can refer to review, using change-id\nIf5d3b56c71cb3b916d04d80e77781d9bdd7f3b5c","commit_id":"97b0139528a2e006eacda64e439f647a9c4748f0"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"20b2861d4a533de7f4dc69ab9f601ac95ff73cdf","unresolved":false,"context_lines":[{"line_number":7,"context_line":"oslo validator"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Implements the Oslo configuration validator,"},{"line_number":10,"context_line":"https://review.openstack.org/#/c/381968/"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Co-Authored-By: Brian Stajkowski \u003cbrian.stajkowski@rackspace.com\u003e"},{"line_number":13,"context_line":"Change-Id: I78d3621afda226f5968963ef408507234dfead4c"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":31,"id":"3a71b18c_cb8ed9cf","line":10,"range":{"start_line":10,"start_character":0,"end_line":10,"end_character":40},"in_reply_to":"3a71b18c_6a37df4c","updated":"2016-12-08 16:50:15.000000000","message":"Done","commit_id":"97b0139528a2e006eacda64e439f647a9c4748f0"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"786143bfbbb2f1f664f8516291d82b029c9e2957","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Implements the Oslo configuration validator,"},{"line_number":10,"context_line":"If5d3b56c71cb3b916d04d80e77781d9bdd7f3b5c"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"oslo-config-validator is a utility for validating"},{"line_number":13,"context_line":"config files against a list of namespaces."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Co-Authored-By: Brian Stajkowski \u003cbrian.stajkowski@rackspace.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":40,"id":"7a3c09a3_d9f0fd93","line":12,"range":{"start_line":12,"start_character":25,"end_line":12,"end_character":26},"updated":"2017-01-17 17:12:43.000000000","message":"nit: \"an\"?","commit_id":"cb2687937e79b9d2ac72e9332847dfb299dc6ac4"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"f6bb400d72fc928d2b5150fde9ee00647fa20509","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Implements the Oslo configuration validator,"},{"line_number":10,"context_line":"If5d3b56c71cb3b916d04d80e77781d9bdd7f3b5c"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"oslo-config-validator is a utility for validating"},{"line_number":13,"context_line":"config files against a list of namespaces."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Co-Authored-By: Brian Stajkowski \u003cbrian.stajkowski@rackspace.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":40,"id":"7a3c09a3_9a7660d5","line":12,"range":{"start_line":12,"start_character":25,"end_line":12,"end_character":26},"in_reply_to":"7a3c09a3_d9f0fd93","updated":"2017-01-17 18:06:08.000000000","message":"In this case it\u0027s just \u0027a\u0027, if utility started with a vowel sound (like \u0027umbrella\u0027) it would be \u0027an\u0027.","commit_id":"cb2687937e79b9d2ac72e9332847dfb299dc6ac4"}],"doc/source/validator.rst":[{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"786143bfbbb2f1f664f8516291d82b029c9e2957","unresolved":false,"context_lines":[{"line_number":1,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":2,"context_line":" oslo-config-validator"},{"line_number":3,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":4,"context_line":""}],"source_content_type":"text/x-rst","patch_set":40,"id":"7a3c09a3_04013805","line":1,"updated":"2017-01-17 17:12:43.000000000","message":"You need to add this file to doc/source/index.rst to list it.","commit_id":"cb2687937e79b9d2ac72e9332847dfb299dc6ac4"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"f6bb400d72fc928d2b5150fde9ee00647fa20509","unresolved":false,"context_lines":[{"line_number":1,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":2,"context_line":" oslo-config-validator"},{"line_number":3,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":4,"context_line":""}],"source_content_type":"text/x-rst","patch_set":40,"id":"7a3c09a3_9a402036","line":1,"in_reply_to":"7a3c09a3_04013805","updated":"2017-01-17 18:06:08.000000000","message":"Done","commit_id":"cb2687937e79b9d2ac72e9332847dfb299dc6ac4"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"786143bfbbb2f1f664f8516291d82b029c9e2957","unresolved":false,"context_lines":[{"line_number":49,"context_line":"The following errors can be generated against an input file:"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"- Option is set in config file but no value given"},{"line_number":52,"context_line":"- Option is required and no default value, but not in config file"},{"line_number":53,"context_line":"- Option doesn\u0027t exist in section but found in another"},{"line_number":54,"context_line":"- Option value is not in range: i.e. not in valid choices"},{"line_number":55,"context_line":"- Option is of wrong type: i.e. IntType and string option value"}],"source_content_type":"text/x-rst","patch_set":40,"id":"7a3c09a3_c4181021","line":52,"range":{"start_line":52,"start_character":2,"end_line":52,"end_character":65},"updated":"2017-01-17 17:12:43.000000000","message":"This sentence is hard to understand to me (non-English speaker). Would it be possible, to rephrase this a little bit? Especially part after comma.\nThanks.","commit_id":"cb2687937e79b9d2ac72e9332847dfb299dc6ac4"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"f6bb400d72fc928d2b5150fde9ee00647fa20509","unresolved":false,"context_lines":[{"line_number":49,"context_line":"The following errors can be generated against an input file:"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"- Option is set in config file but no value given"},{"line_number":52,"context_line":"- Option is required and no default value, but not in config file"},{"line_number":53,"context_line":"- Option doesn\u0027t exist in section but found in another"},{"line_number":54,"context_line":"- Option value is not in range: i.e. not in valid choices"},{"line_number":55,"context_line":"- Option is of wrong type: i.e. IntType and string option value"}],"source_content_type":"text/x-rst","patch_set":40,"id":"7a3c09a3_5a5dd877","line":52,"range":{"start_line":52,"start_character":2,"end_line":52,"end_character":65},"in_reply_to":"7a3c09a3_c4181021","updated":"2017-01-17 18:06:08.000000000","message":"Done","commit_id":"cb2687937e79b9d2ac72e9332847dfb299dc6ac4"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"2c9c2521cdebb500f89e1f53c388d8e4316db65b","unresolved":false,"context_lines":[{"line_number":37,"context_line":"- Option is set to default value, not necessary"},{"line_number":38,"context_line":"- Option is marked as advanced"},{"line_number":39,"context_line":"- Option is marked deprecated_for_removal"},{"line_number":40,"context_line":"- Option doesn\u0027t exist in section, possibly misspelled"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"A warning indicates there might be a problem with a setting, but it isn\u0027t"},{"line_number":43,"context_line":"technically invalid. Settings that emit warnings should be manually verified."}],"source_content_type":"text/x-rst","patch_set":41,"id":"5a3905b3_0582bdc8","line":40,"range":{"start_line":40,"start_character":2,"end_line":40,"end_character":54},"updated":"2017-01-24 23:02:31.000000000","message":"Why a misspelled option raises a warning when a misspelled section raises an error?","commit_id":"cee991db3de4aa4a088da4ba2ddbfb714ae65f47"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"abe8564eeea63b50ac3d1ab43ca7804de33a127b","unresolved":false,"context_lines":[{"line_number":37,"context_line":"- Option is set to default value, not necessary"},{"line_number":38,"context_line":"- Option is marked as advanced"},{"line_number":39,"context_line":"- Option is marked deprecated_for_removal"},{"line_number":40,"context_line":"- Option doesn\u0027t exist in section, possibly misspelled"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"A warning indicates there might be a problem with a setting, but it isn\u0027t"},{"line_number":43,"context_line":"technically invalid. Settings that emit warnings should be manually verified."}],"source_content_type":"text/x-rst","patch_set":41,"id":"3a461143_33954740","line":40,"range":{"start_line":40,"start_character":2,"end_line":40,"end_character":54},"in_reply_to":"5a3905b3_0582bdc8","updated":"2017-01-26 16:43:08.000000000","message":"Finding an option that isn\u0027t in the namespaces isn\u0027t an error in a config file, you can put any extra values you want in a section and it\u0027s still technically correct, they just wont be used - warning.\n\nA possibly misspelled section means that an entire section of options can\u0027t be validated, or the namespaces weren\u0027t defined correctly, so an error.","commit_id":"cee991db3de4aa4a088da4ba2ddbfb714ae65f47"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"429c2acc6ee7bcd1883637e143285aa76526568c","unresolved":false,"context_lines":[{"line_number":17,"context_line":"  --ignore-namespace keystone_authtoken \\"},{"line_number":18,"context_line":"  --input-file /etc/neutron/neutron.conf"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"An input file with no errors will output::"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"  Config file is valid: True"},{"line_number":23,"context_line":""}],"source_content_type":"text/x-rst","patch_set":44,"id":"da36d5c6_1d085528","line":20,"updated":"2017-02-27 21:30:33.000000000","message":"Why would it output anything other than a return code of zero?","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"56c1afcaa5fdeaad5f9c17d28cd36f45236baf4b","unresolved":false,"context_lines":[{"line_number":17,"context_line":"  --ignore-namespace keystone_authtoken \\"},{"line_number":18,"context_line":"  --input-file /etc/neutron/neutron.conf"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"An input file with no errors will output::"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"  Config file is valid: True"},{"line_number":23,"context_line":""}],"source_content_type":"text/x-rst","patch_set":44,"id":"1a1ced50_58f2e99b","line":20,"in_reply_to":"da36d5c6_1d085528","updated":"2017-03-22 21:20:56.000000000","message":"Done","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"429c2acc6ee7bcd1883637e143285aa76526568c","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"An input file with errors and warnings will output similar to::"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"  Config file is valid: False"},{"line_number":27,"context_line":"      ERROR: Section databases is not a valid section, possibly misspelled [\u0027database\u0027]"},{"line_number":28,"context_line":"      WARNING: DEFAULT bind_host is set to default value [\u00270.0.0.0\u0027]"},{"line_number":29,"context_line":""}],"source_content_type":"text/x-rst","patch_set":44,"id":"da36d5c6_9d61a5d6","line":26,"updated":"2017-02-27 21:30:33.000000000","message":"This should be excluded in favor of the messages below and non-zero return codes (perhaps to indicate the severity of the issues).","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"56c1afcaa5fdeaad5f9c17d28cd36f45236baf4b","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"An input file with errors and warnings will output similar to::"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"  Config file is valid: False"},{"line_number":27,"context_line":"      ERROR: Section databases is not a valid section, possibly misspelled [\u0027database\u0027]"},{"line_number":28,"context_line":"      WARNING: DEFAULT bind_host is set to default value [\u00270.0.0.0\u0027]"},{"line_number":29,"context_line":""}],"source_content_type":"text/x-rst","patch_set":44,"id":"1a1ced50_78efa5b0","line":26,"in_reply_to":"da36d5c6_9d61a5d6","updated":"2017-03-22 21:20:56.000000000","message":"Done","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"429c2acc6ee7bcd1883637e143285aa76526568c","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"  Config file is valid: False"},{"line_number":27,"context_line":"      ERROR: Section databases is not a valid section, possibly misspelled [\u0027database\u0027]"},{"line_number":28,"context_line":"      WARNING: DEFAULT bind_host is set to default value [\u00270.0.0.0\u0027]"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":".. versionadded:: 3.22"},{"line_number":31,"context_line":""}],"source_content_type":"text/x-rst","patch_set":44,"id":"da36d5c6_3d5b5930","line":28,"updated":"2017-02-27 21:30:33.000000000","message":"As I read this example the first time, it just sounded like the operator did not configure bind_host and left it at the default value. For the sake of UX, I think that this should clarify both that the option is *explicitly* set to it\u0027s default value and that the option *can be removed*.","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"56c1afcaa5fdeaad5f9c17d28cd36f45236baf4b","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"  Config file is valid: False"},{"line_number":27,"context_line":"      ERROR: Section databases is not a valid section, possibly misspelled [\u0027database\u0027]"},{"line_number":28,"context_line":"      WARNING: DEFAULT bind_host is set to default value [\u00270.0.0.0\u0027]"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":".. versionadded:: 3.22"},{"line_number":31,"context_line":""}],"source_content_type":"text/x-rst","patch_set":44,"id":"1a1ced50_d8fdf96f","line":28,"in_reply_to":"da36d5c6_3d5b5930","updated":"2017-03-22 21:20:56.000000000","message":"Done","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"429c2acc6ee7bcd1883637e143285aa76526568c","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":"The following warnings can be generated against an input file:"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"- Option is set to default value, not necessary"},{"line_number":38,"context_line":"- Option is marked as advanced"},{"line_number":39,"context_line":"- Option is marked deprecated_for_removal"},{"line_number":40,"context_line":"- Option doesn\u0027t exist in section, possibly misspelled"}],"source_content_type":"text/x-rst","patch_set":44,"id":"da36d5c6_bdb58932","line":37,"updated":"2017-02-27 21:30:33.000000000","message":"Option is unnecessarily configured with the default value","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"44c615f33dda412d38e73e404a428169be023bfa","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":"The following warnings can be generated against an input file:"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"- Option is set to default value, not necessary"},{"line_number":38,"context_line":"- Option is marked as advanced"},{"line_number":39,"context_line":"- Option is marked deprecated_for_removal"},{"line_number":40,"context_line":"- Option doesn\u0027t exist in section, possibly misspelled"}],"source_content_type":"text/x-rst","patch_set":44,"id":"ba2be162_320f5789","line":37,"in_reply_to":"da36d5c6_bdb58932","updated":"2017-03-07 16:55:49.000000000","message":"Done","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"429c2acc6ee7bcd1883637e143285aa76526568c","unresolved":false,"context_lines":[{"line_number":35,"context_line":"The following warnings can be generated against an input file:"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"- Option is set to default value, not necessary"},{"line_number":38,"context_line":"- Option is marked as advanced"},{"line_number":39,"context_line":"- Option is marked deprecated_for_removal"},{"line_number":40,"context_line":"- Option doesn\u0027t exist in section, possibly misspelled"},{"line_number":41,"context_line":""}],"source_content_type":"text/x-rst","patch_set":44,"id":"da36d5c6_fdec612b","line":38,"updated":"2017-02-27 21:30:33.000000000","message":"What\u0027s the use case for being warned about using advanced options? I would just find that annoying.","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"44c615f33dda412d38e73e404a428169be023bfa","unresolved":false,"context_lines":[{"line_number":35,"context_line":"The following warnings can be generated against an input file:"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"- Option is set to default value, not necessary"},{"line_number":38,"context_line":"- Option is marked as advanced"},{"line_number":39,"context_line":"- Option is marked deprecated_for_removal"},{"line_number":40,"context_line":"- Option doesn\u0027t exist in section, possibly misspelled"},{"line_number":41,"context_line":""}],"source_content_type":"text/x-rst","patch_set":44,"id":"ba2be162_b272670f","line":38,"in_reply_to":"da36d5c6_fdec612b","updated":"2017-03-07 16:55:49.000000000","message":"Advanced options are being warned on discovery due to them being \u0027not normally used by the majority of users and they might have a significant effect on stability and/or performance\u0027, per the comments in cfg.py.\n\nUpdated the message and added an option to ignore advanced warnings - done.","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"429c2acc6ee7bcd1883637e143285aa76526568c","unresolved":false,"context_lines":[{"line_number":37,"context_line":"- Option is set to default value, not necessary"},{"line_number":38,"context_line":"- Option is marked as advanced"},{"line_number":39,"context_line":"- Option is marked deprecated_for_removal"},{"line_number":40,"context_line":"- Option doesn\u0027t exist in section, possibly misspelled"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"A warning indicates there might be a problem with a setting, but it isn\u0027t"},{"line_number":43,"context_line":"technically invalid. Settings that emit warnings should be manually verified."}],"source_content_type":"text/x-rst","patch_set":44,"id":"da36d5c6_5dc3ad8a","line":40,"updated":"2017-02-27 21:30:33.000000000","message":"possibly misspelled or removed in a different release.","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"429c2acc6ee7bcd1883637e143285aa76526568c","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":"The following errors can be generated against an input file:"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"- Option is set in config file but no value given"},{"line_number":52,"context_line":"- Option with no default value is required, but isn\u0027t defined in config file"},{"line_number":53,"context_line":"- Option doesn\u0027t exist in section but found in another"},{"line_number":54,"context_line":"- Option value is not in range: i.e. not in valid choices"}],"source_content_type":"text/x-rst","patch_set":44,"id":"da36d5c6_5d4acd28","line":51,"updated":"2017-02-27 21:30:33.000000000","message":"This is not a valid way to set options to empty strings or null?","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"44c615f33dda412d38e73e404a428169be023bfa","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":"The following errors can be generated against an input file:"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"- Option is set in config file but no value given"},{"line_number":52,"context_line":"- Option with no default value is required, but isn\u0027t defined in config file"},{"line_number":53,"context_line":"- Option doesn\u0027t exist in section but found in another"},{"line_number":54,"context_line":"- Option value is not in range: i.e. not in valid choices"}],"source_content_type":"text/x-rst","patch_set":44,"id":"9a30ddce_402bab82","line":51,"in_reply_to":"da36d5c6_5d4acd28","updated":"2017-03-07 16:55:49.000000000","message":"Not that I can find, oslo.config doesn\u0027t set allow_no_value.\n\nIt\u0027s not unthinkable that a project is working around this limitation, but they can/should use \u0027\u0027 and \u0027none\u0027 to explicitly set these values as required, for example, the way Nova configures cpu_mode, and the error you get with a blank option value:\n\nValue for option cpu_mode is not valid: Valid values are [host-model, host-passthrough, custom, none], but found \u0027\u0027","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"429c2acc6ee7bcd1883637e143285aa76526568c","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"- Option is set in config file but no value given"},{"line_number":52,"context_line":"- Option with no default value is required, but isn\u0027t defined in config file"},{"line_number":53,"context_line":"- Option doesn\u0027t exist in section but found in another"},{"line_number":54,"context_line":"- Option value is not in range: i.e. not in valid choices"},{"line_number":55,"context_line":"- Option is of wrong type: i.e. IntType and string option value"},{"line_number":56,"context_line":"- Section not known in namespaces"}],"source_content_type":"text/x-rst","patch_set":44,"id":"da36d5c6_1daa1586","line":53,"updated":"2017-02-27 21:30:33.000000000","message":"Warning? This does not seem like it would reliably indicate a configuration error.","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"44c615f33dda412d38e73e404a428169be023bfa","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"- Option is set in config file but no value given"},{"line_number":52,"context_line":"- Option with no default value is required, but isn\u0027t defined in config file"},{"line_number":53,"context_line":"- Option doesn\u0027t exist in section but found in another"},{"line_number":54,"context_line":"- Option value is not in range: i.e. not in valid choices"},{"line_number":55,"context_line":"- Option is of wrong type: i.e. IntType and string option value"},{"line_number":56,"context_line":"- Section not known in namespaces"}],"source_content_type":"text/x-rst","patch_set":44,"id":"9a30ddce_20ddd714","line":53,"in_reply_to":"da36d5c6_1daa1586","updated":"2017-03-07 16:55:49.000000000","message":"It\u0027s not perfectly 100% reliable, as in the case of naming collisions across namespaces. The keystone_authtoken middleware section is the primary offender here, it\u0027s options are shared across sections and is why we had to add ignore-namespace. I think I\u0027ll rename this to \"ignore-section\".","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"429c2acc6ee7bcd1883637e143285aa76526568c","unresolved":false,"context_lines":[{"line_number":53,"context_line":"- Option doesn\u0027t exist in section but found in another"},{"line_number":54,"context_line":"- Option value is not in range: i.e. not in valid choices"},{"line_number":55,"context_line":"- Option is of wrong type: i.e. IntType and string option value"},{"line_number":56,"context_line":"- Section not known in namespaces"},{"line_number":57,"context_line":"- Section misspelled"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"An error indicates a serious problem with the config file that will prevent the"}],"source_content_type":"text/x-rst","patch_set":44,"id":"da36d5c6_5d71ed76","line":56,"updated":"2017-02-27 21:30:33.000000000","message":"\"Section is not a known namespace\" -- this should perhaps be a warning? Operators are free to add their own middleware with it\u0027s own configuration sections in configuration files. Or, the user just opted to not validate that section.","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"7033ec71a91a3779227377e219bb78a41d742dcc","unresolved":false,"context_lines":[{"line_number":53,"context_line":"- Option doesn\u0027t exist in section but found in another"},{"line_number":54,"context_line":"- Option value is not in range: i.e. not in valid choices"},{"line_number":55,"context_line":"- Option is of wrong type: i.e. IntType and string option value"},{"line_number":56,"context_line":"- Section not known in namespaces"},{"line_number":57,"context_line":"- Section misspelled"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"An error indicates a serious problem with the config file that will prevent the"}],"source_content_type":"text/x-rst","patch_set":44,"id":"ba2be162_0308fd27","line":56,"in_reply_to":"da36d5c6_5d71ed76","updated":"2017-03-06 20:15:08.000000000","message":"Disregard the comment on L56 -- coming from keystone-manage doctor, which has deep knowledge of specific options, I was thinking oslo.config validator would need to be able to skip sections that it did not \"understand\", but without that knowledge, it makes more sense to validate the expected set of sections \u0026 options is exactly correct, without ignoring any.","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"429c2acc6ee7bcd1883637e143285aa76526568c","unresolved":false,"context_lines":[{"line_number":54,"context_line":"- Option value is not in range: i.e. not in valid choices"},{"line_number":55,"context_line":"- Option is of wrong type: i.e. IntType and string option value"},{"line_number":56,"context_line":"- Section not known in namespaces"},{"line_number":57,"context_line":"- Section misspelled"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"An error indicates a serious problem with the config file that will prevent the"},{"line_number":60,"context_line":"services from initializing as intended. The operator should correct the problem"}],"source_content_type":"text/x-rst","patch_set":44,"id":"da36d5c6_7d915152","line":57,"updated":"2017-02-27 21:30:33.000000000","message":"I also think this should be a warning, because it\u0027s just a guess.","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"7033ec71a91a3779227377e219bb78a41d742dcc","unresolved":false,"context_lines":[{"line_number":54,"context_line":"- Option value is not in range: i.e. not in valid choices"},{"line_number":55,"context_line":"- Option is of wrong type: i.e. IntType and string option value"},{"line_number":56,"context_line":"- Section not known in namespaces"},{"line_number":57,"context_line":"- Section misspelled"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"An error indicates a serious problem with the config file that will prevent the"},{"line_number":60,"context_line":"services from initializing as intended. The operator should correct the problem"}],"source_content_type":"text/x-rst","patch_set":44,"id":"ba2be162_e385a959","line":57,"in_reply_to":"da36d5c6_7d915152","updated":"2017-03-06 20:15:08.000000000","message":"Disregard -- same reasoning as L56.","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"7c53a5e1c39dadf072eb3494e02264143e0350a1","unresolved":false,"context_lines":[{"line_number":25,"context_line":"An input file with errors and warnings will output similar to::"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    ERROR: Section databases is not a valid section, possibly misspelled [\u0027database\u0027]"},{"line_number":28,"context_line":"    WARNING: DEFAULT bind_host is set to default value [\u00270.0.0.0\u0027]"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":".. versionadded:: 3.22"},{"line_number":31,"context_line":""}],"source_content_type":"text/x-rst","patch_set":45,"id":"1a1ced50_aa0e5089","line":28,"updated":"2017-03-22 21:51:04.000000000","message":"Forgot to update this with the new message","commit_id":"da07b81fc85623a3533935e70c81ec9f87d08b0f"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"5c88a88c008bd71354d561ad80c25c44aa63c545","unresolved":false,"context_lines":[{"line_number":15,"context_line":"  --namespace oslo.service.sslutils --namespace oslo.service.wsgi \\"},{"line_number":16,"context_line":"  --namespace keystonemiddleware.auth_token --namespace neutron.qos \\"},{"line_number":17,"context_line":"  --ignore-section keystone_authtoken \\"},{"line_number":18,"context_line":"  --input-file /etc/neutron/neutron.conf"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"An input file with no errors or warnings will return code 0, and if reporting"},{"line_number":21,"context_line":"isn\u0027t disabled, will print::"}],"source_content_type":"text/x-rst","patch_set":48,"id":"ffe62b97_1b5a85f2","line":18,"updated":"2017-03-24 20:49:25.000000000","message":"left a comment on this on L48 https://review.openstack.org/#/c/384559/48/oslo_config/validator.py,unified","commit_id":"c9b4acaf1933aa9b436252ac50498fcd5332c4b0"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"de11bfda72ecdce515fad9795a8a9b12573fc0be","unresolved":false,"context_lines":[{"line_number":15,"context_line":"  --namespace oslo.service.sslutils --namespace oslo.service.wsgi \\"},{"line_number":16,"context_line":"  --namespace keystonemiddleware.auth_token --namespace neutron.qos \\"},{"line_number":17,"context_line":"  --ignore-section keystone_authtoken \\"},{"line_number":18,"context_line":"  --input-file /etc/neutron/neutron.conf"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"An input file with no errors or warnings will return code 0, and if reporting"},{"line_number":21,"context_line":"isn\u0027t disabled, will print::"}],"source_content_type":"text/x-rst","patch_set":48,"id":"ffe62b97_2e55c21d","line":18,"in_reply_to":"ffe62b97_1b5a85f2","updated":"2017-03-27 17:34:41.000000000","message":"replied, please advise","commit_id":"c9b4acaf1933aa9b436252ac50498fcd5332c4b0"},{"author":{"_account_id":18332,"name":"Ankur","email":"ankur.gupta@intel.com","username":"ankur-gupta-f"},"change_message_id":"4a2d35b8b476f4eefc3a716791bd78570a74a793","unresolved":false,"context_lines":[{"line_number":1,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":2,"context_line":" oslo-config-validator"},{"line_number":3,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":4,"context_line":""},{"line_number":5,"context_line":"oslo-config-validator is a utility for validating config file sections and"},{"line_number":6,"context_line":"options in their relative namespaces. For example, to validate a neutron"}],"source_content_type":"text/x-rst","patch_set":50,"id":"ffe62b97_7a58bd2f","line":3,"updated":"2017-03-29 16:39:42.000000000","message":"Extra \"\u003d\" on top and bottom","commit_id":"7898e3fb29416853a88a0dd4b0ed4cfc85a5730d"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"355151fc51d2b8edaafe79235770972c20a70a80","unresolved":false,"context_lines":[{"line_number":1,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":2,"context_line":" oslo-config-validator"},{"line_number":3,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":4,"context_line":""},{"line_number":5,"context_line":"oslo-config-validator is a utility for validating config file sections and"},{"line_number":6,"context_line":"options in their relative namespaces. For example, to validate a neutron"}],"source_content_type":"text/x-rst","patch_set":50,"id":"ffe62b97_6006ca54","line":3,"in_reply_to":"ffe62b97_7a58bd2f","updated":"2017-03-29 17:18:30.000000000","message":"Done","commit_id":"7898e3fb29416853a88a0dd4b0ed4cfc85a5730d"},{"author":{"_account_id":18332,"name":"Ankur","email":"ankur.gupta@intel.com","username":"ankur-gupta-f"},"change_message_id":"4a2d35b8b476f4eefc3a716791bd78570a74a793","unresolved":false,"context_lines":[{"line_number":7,"context_line":"config file you would run::"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"  $\u003e oslo-config-validator --namespace neutron --namespace neutron.agent \\"},{"line_number":10,"context_line":"  --namespace neutron.db --namespace neutron.extensions \\"},{"line_number":11,"context_line":"  --namespace nova.auth --namespace oslo.log --namespace oslo.db \\"},{"line_number":12,"context_line":"  --namespace oslo.policy --namespace oslo.concurrency \\"},{"line_number":13,"context_line":"  --namespace oslo.messaging --namespace oslo.middleware.cors \\"}],"source_content_type":"text/x-rst","patch_set":50,"id":"ffe62b97_5addf9dd","line":10,"updated":"2017-03-29 16:39:42.000000000","message":"all these below need to be in line with the line above. i.e. add 3 spaces","commit_id":"7898e3fb29416853a88a0dd4b0ed4cfc85a5730d"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"355151fc51d2b8edaafe79235770972c20a70a80","unresolved":false,"context_lines":[{"line_number":7,"context_line":"config file you would run::"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"  $\u003e oslo-config-validator --namespace neutron --namespace neutron.agent \\"},{"line_number":10,"context_line":"  --namespace neutron.db --namespace neutron.extensions \\"},{"line_number":11,"context_line":"  --namespace nova.auth --namespace oslo.log --namespace oslo.db \\"},{"line_number":12,"context_line":"  --namespace oslo.policy --namespace oslo.concurrency \\"},{"line_number":13,"context_line":"  --namespace oslo.messaging --namespace oslo.middleware.cors \\"}],"source_content_type":"text/x-rst","patch_set":50,"id":"ffe62b97_40018637","line":10,"in_reply_to":"ffe62b97_5addf9dd","updated":"2017-03-29 17:18:30.000000000","message":"Done","commit_id":"7898e3fb29416853a88a0dd4b0ed4cfc85a5730d"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"acbeac75069905466fc3d91367794be9770b7758","unresolved":false,"context_lines":[{"line_number":15,"context_line":"     --namespace oslo.service.sslutils --namespace oslo.service.wsgi \\"},{"line_number":16,"context_line":"     --namespace keystonemiddleware.auth_token --namespace neutron.qos \\"},{"line_number":17,"context_line":"     --ignore-section keystone_authtoken \\"},{"line_number":18,"context_line":"     --input-file /etc/neutron/neutron.conf"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"An input file with no errors or warnings will return code 0, and if reporting"},{"line_number":21,"context_line":"isn\u0027t disabled, will print::"}],"source_content_type":"text/x-rst","patch_set":52,"id":"bff0334d_9bb7d587","line":18,"updated":"2017-04-05 20:47:46.000000000","message":"Oh, wow. It\u0027s possible to pass the sample config generator config file instead of specifying all of those namespaces on the command line, right?","commit_id":"890351681e3144a5ff6af10de1a6c53e8f4e9e4b"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"4898091ba737c832f4f2963a571a7bdac4547049","unresolved":false,"context_lines":[{"line_number":15,"context_line":"     --namespace oslo.service.sslutils --namespace oslo.service.wsgi \\"},{"line_number":16,"context_line":"     --namespace keystonemiddleware.auth_token --namespace neutron.qos \\"},{"line_number":17,"context_line":"     --ignore-section keystone_authtoken \\"},{"line_number":18,"context_line":"     --input-file /etc/neutron/neutron.conf"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"An input file with no errors or warnings will return code 0, and if reporting"},{"line_number":21,"context_line":"isn\u0027t disabled, will print::"}],"source_content_type":"text/x-rst","patch_set":52,"id":"bff0334d_acf35373","line":18,"in_reply_to":"bff0334d_697d44b0","updated":"2017-04-06 20:26:55.000000000","message":"The config library treats command line options as special options that can also appear in the config file, so as long as the validator command takes the --config-file option (which is implemented in the ConfigOpts class, so it should be there for free), all of the extra values can be passed that way, if the caller chooses to. We should document that, but we can do that in another patch.","commit_id":"890351681e3144a5ff6af10de1a6c53e8f4e9e4b"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"4634376ad9d14aa26b2078d29c2ca71df2167f2a","unresolved":false,"context_lines":[{"line_number":15,"context_line":"     --namespace oslo.service.sslutils --namespace oslo.service.wsgi \\"},{"line_number":16,"context_line":"     --namespace keystonemiddleware.auth_token --namespace neutron.qos \\"},{"line_number":17,"context_line":"     --ignore-section keystone_authtoken \\"},{"line_number":18,"context_line":"     --input-file /etc/neutron/neutron.conf"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"An input file with no errors or warnings will return code 0, and if reporting"},{"line_number":21,"context_line":"isn\u0027t disabled, will print::"}],"source_content_type":"text/x-rst","patch_set":52,"id":"bff0334d_697d44b0","line":18,"in_reply_to":"bff0334d_9bb7d587","updated":"2017-04-06 17:14:40.000000000","message":"I implemented the namespace listing by parsing the generator file in the integration patches [0] rather than here for multiple reasons:\n\nA.) We need a way of allowing this verbose command for projects like cinder (or future projects that take a note from cinder) due to the way they pollute the conf file with unverifiable sections, and in real deployments (see C).\n\nB.) Each project has different requirements for the ignore-section list. For example, nova needs to ignore both keystone_authtoken and api sections, whereas neutron only ignores keystone_authtoken. So we still need to know which sections to ignore to get correct output, but there\u0027s no way to automate discovering them. I predicted forcing spelling them out here but giving a bespoke integration per-project would prevent false-negative \"bug\" reports when lazily passing the conf file and generator file but no ignores.\n\nC.) The generator file is not needed to stand up a given project and just takes up space, so real deployments don\u0027t have this file on the target node (confirmed for the largest OS IRL deployment). That\u0027s exactly where this functionality is needed. I didn\u0027t want to require changing the deployment runbooks too much. Instead, developers can use the integrations while developing (they have the file in most cases), and in production they will want to either change the runbooks and use the integrations anyway or ...\n\nD.) alias this command for their unique case if it\u0027s really the entry point they require.\n\nE.) I\u0027d be willing to add it as a shortcut but I think B is a valid counterargument we should consider from a code maintenance perspective.\n\n[0] https://review.openstack.org/#/c/429793/ https://review.openstack.org/#/c/428974/ https://review.openstack.org/#/c/426980/ https://review.openstack.org/#/c/426408/ https://review.openstack.org/#/c/426397/","commit_id":"890351681e3144a5ff6af10de1a6c53e8f4e9e4b"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"acbeac75069905466fc3d91367794be9770b7758","unresolved":false,"context_lines":[{"line_number":49,"context_line":"- Option is set to default value, not necessary"},{"line_number":50,"context_line":"- Option is marked \u0027advanced\u0027"},{"line_number":51,"context_line":"- Option is marked \u0027deprecated for removal\u0027"},{"line_number":52,"context_line":"- Option doesn\u0027t exist in section, possibly misspelled"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"A warning indicates there might be a problem with a setting, but it isn\u0027t"},{"line_number":55,"context_line":"technically invalid. Settings that emit warnings should be manually verified."}],"source_content_type":"text/x-rst","patch_set":52,"id":"bff0334d_5b5f0d41","line":52,"updated":"2017-04-05 20:47:46.000000000","message":"Do we eventually want this to work like a linter, where we can ignore some of these warnings but fail on others? That would be follow-up work, I\u0027m just trying to picture what the future of the tool looks like.","commit_id":"890351681e3144a5ff6af10de1a6c53e8f4e9e4b"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"4634376ad9d14aa26b2078d29c2ca71df2167f2a","unresolved":false,"context_lines":[{"line_number":49,"context_line":"- Option is set to default value, not necessary"},{"line_number":50,"context_line":"- Option is marked \u0027advanced\u0027"},{"line_number":51,"context_line":"- Option is marked \u0027deprecated for removal\u0027"},{"line_number":52,"context_line":"- Option doesn\u0027t exist in section, possibly misspelled"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"A warning indicates there might be a problem with a setting, but it isn\u0027t"},{"line_number":55,"context_line":"technically invalid. Settings that emit warnings should be manually verified."}],"source_content_type":"text/x-rst","patch_set":52,"id":"bff0334d_a43811d3","line":52,"in_reply_to":"bff0334d_5b5f0d41","updated":"2017-04-06 17:14:40.000000000","message":"Yes, I\u0027ve already added a way to ignore the \u0027advanced\u0027 warning, so I think eventually all of the warnings will be à la carte ignorable.","commit_id":"890351681e3144a5ff6af10de1a6c53e8f4e9e4b"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"65af8641bc73c4e1dd0d0c3888409a9bc695ec42","unresolved":false,"context_lines":[{"line_number":49,"context_line":"- Option is set to default value, not necessary"},{"line_number":50,"context_line":"- Option is marked \u0027advanced\u0027"},{"line_number":51,"context_line":"- Option is marked \u0027deprecated for removal\u0027"},{"line_number":52,"context_line":"- Option doesn\u0027t exist in section, possibly misspelled"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"A warning indicates there might be a problem with a setting, but it isn\u0027t"},{"line_number":55,"context_line":"technically invalid. Settings that emit warnings should be manually verified."}],"source_content_type":"text/x-rst","patch_set":52,"id":"bff0334d_d1c2f584","line":52,"in_reply_to":"bff0334d_6ca2eb4d","updated":"2017-04-12 20:36:04.000000000","message":"Done","commit_id":"890351681e3144a5ff6af10de1a6c53e8f4e9e4b"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"4898091ba737c832f4f2963a571a7bdac4547049","unresolved":false,"context_lines":[{"line_number":49,"context_line":"- Option is set to default value, not necessary"},{"line_number":50,"context_line":"- Option is marked \u0027advanced\u0027"},{"line_number":51,"context_line":"- Option is marked \u0027deprecated for removal\u0027"},{"line_number":52,"context_line":"- Option doesn\u0027t exist in section, possibly misspelled"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"A warning indicates there might be a problem with a setting, but it isn\u0027t"},{"line_number":55,"context_line":"technically invalid. Settings that emit warnings should be manually verified."}],"source_content_type":"text/x-rst","patch_set":52,"id":"bff0334d_6ca2eb4d","line":52,"in_reply_to":"bff0334d_a43811d3","updated":"2017-04-06 20:26:55.000000000","message":"It might be useful to go ahead and assign them some sort of identifier like pylint does, then, to make that UI easy to extend.","commit_id":"890351681e3144a5ff6af10de1a6c53e8f4e9e4b"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"acbeac75069905466fc3d91367794be9770b7758","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"The following errors can be generated against an input file:"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"- Option is set in config file but no value given"},{"line_number":64,"context_line":"- Option with no default value is required, but isn\u0027t defined in config file"},{"line_number":65,"context_line":"- Option doesn\u0027t exist in section but found in another"},{"line_number":66,"context_line":"- Option value is not in range: i.e. not in valid choices"}],"source_content_type":"text/x-rst","patch_set":52,"id":"bff0334d_c6fea404","line":63,"updated":"2017-04-05 20:47:46.000000000","message":"How does one set an empty string? For example, to blank out logging_debug_format_suffix to avoid including location information in the log?","commit_id":"890351681e3144a5ff6af10de1a6c53e8f4e9e4b"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"4898091ba737c832f4f2963a571a7bdac4547049","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"The following errors can be generated against an input file:"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"- Option is set in config file but no value given"},{"line_number":64,"context_line":"- Option with no default value is required, but isn\u0027t defined in config file"},{"line_number":65,"context_line":"- Option doesn\u0027t exist in section but found in another"},{"line_number":66,"context_line":"- Option value is not in range: i.e. not in valid choices"}],"source_content_type":"text/x-rst","patch_set":52,"id":"bff0334d_ac66b328","line":63,"in_reply_to":"bff0334d_84c98d79","updated":"2017-04-06 20:26:55.000000000","message":"That\u0027s fine for a \"choices\" case, but there are definitely some options for which an empty value is valid. Is this going to report errors for those cases?","commit_id":"890351681e3144a5ff6af10de1a6c53e8f4e9e4b"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"47dc371e5424f44f6e81fa744145fa8a45211678","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"The following errors can be generated against an input file:"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"- Option is set in config file but no value given"},{"line_number":64,"context_line":"- Option with no default value is required, but isn\u0027t defined in config file"},{"line_number":65,"context_line":"- Option doesn\u0027t exist in section but found in another"},{"line_number":66,"context_line":"- Option value is not in range: i.e. not in valid choices"}],"source_content_type":"text/x-rst","patch_set":52,"id":"bff0334d_722520ab","line":63,"in_reply_to":"bff0334d_87006869","updated":"2017-04-06 20:53:00.000000000","message":"I guess my point is that we have options defined today for which an empty string is valid, so we need to allow them. This is another reason I think letting the Opt class do the validation makes more sense, instead of adding rules (or re-implementing checks) in this tool. We already have to do some of the sort of validation in the parsing code, let\u0027s reuse that where we can.","commit_id":"890351681e3144a5ff6af10de1a6c53e8f4e9e4b"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"0ad2d6f61d81e564631aa30301057e97603bd2c9","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"The following errors can be generated against an input file:"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"- Option is set in config file but no value given"},{"line_number":64,"context_line":"- Option with no default value is required, but isn\u0027t defined in config file"},{"line_number":65,"context_line":"- Option doesn\u0027t exist in section but found in another"},{"line_number":66,"context_line":"- Option value is not in range: i.e. not in valid choices"}],"source_content_type":"text/x-rst","patch_set":52,"id":"bff0334d_87006869","line":63,"in_reply_to":"bff0334d_ac66b328","updated":"2017-04-06 20:41:05.000000000","message":"I think a circumspect way to handle an \"empty string\" option value would be to make it not required, default \u0027\u0027. If you want an empty string, you just leave it out of the config. If that\u0027s not tenable, we should brainstorm another approach.","commit_id":"890351681e3144a5ff6af10de1a6c53e8f4e9e4b"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"4634376ad9d14aa26b2078d29c2ca71df2167f2a","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"The following errors can be generated against an input file:"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"- Option is set in config file but no value given"},{"line_number":64,"context_line":"- Option with no default value is required, but isn\u0027t defined in config file"},{"line_number":65,"context_line":"- Option doesn\u0027t exist in section but found in another"},{"line_number":66,"context_line":"- Option value is not in range: i.e. not in valid choices"}],"source_content_type":"text/x-rst","patch_set":52,"id":"bff0334d_84c98d79","line":63,"in_reply_to":"bff0334d_c6fea404","updated":"2017-04-06 17:14:40.000000000","message":"The projects should be using \"some_option\u003dnone\" or however they want to handle that in accordance with their own tastes, because allow_no_value is not set by oslo-config as far as I can tell. For example, the way Nova configures cpu_mode, and the error you get with a blank option value:\n\nValue for option cpu_mode is not valid: Valid values are [host-model, host-passthrough, custom, none], but found \u0027\u0027\n\nWhich makes sense, there\u0027s no way for anyone to tell if that\u0027s supposed to be blank or if a value is meant to be there and was missed manually or not dynamically set somewhere.","commit_id":"890351681e3144a5ff6af10de1a6c53e8f4e9e4b"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"acbeac75069905466fc3d91367794be9770b7758","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":"- Option is set in config file but no value given"},{"line_number":64,"context_line":"- Option with no default value is required, but isn\u0027t defined in config file"},{"line_number":65,"context_line":"- Option doesn\u0027t exist in section but found in another"},{"line_number":66,"context_line":"- Option value is not in range: i.e. not in valid choices"},{"line_number":67,"context_line":"- Option is of wrong type: i.e. IntType and string option value"},{"line_number":68,"context_line":"- Section not known in namespaces"}],"source_content_type":"text/x-rst","patch_set":52,"id":"bff0334d_a69f20b3","line":65,"updated":"2017-04-05 20:47:46.000000000","message":"This might trip up cases like cinder, where the sections are dynamically defined but generic examples are given in the sample config.\n\nhttp://git.openstack.org/cgit/openstack/cinder/tree/cinder/opts.py#n368","commit_id":"890351681e3144a5ff6af10de1a6c53e8f4e9e4b"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"0ad2d6f61d81e564631aa30301057e97603bd2c9","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":"- Option is set in config file but no value given"},{"line_number":64,"context_line":"- Option with no default value is required, but isn\u0027t defined in config file"},{"line_number":65,"context_line":"- Option doesn\u0027t exist in section but found in another"},{"line_number":66,"context_line":"- Option value is not in range: i.e. not in valid choices"},{"line_number":67,"context_line":"- Option is of wrong type: i.e. IntType and string option value"},{"line_number":68,"context_line":"- Section not known in namespaces"}],"source_content_type":"text/x-rst","patch_set":52,"id":"bff0334d_472820e1","line":65,"in_reply_to":"bff0334d_4c0e073c","updated":"2017-04-06 20:41:05.000000000","message":"Sounds good to me.","commit_id":"890351681e3144a5ff6af10de1a6c53e8f4e9e4b"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"4634376ad9d14aa26b2078d29c2ca71df2167f2a","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":"- Option is set in config file but no value given"},{"line_number":64,"context_line":"- Option with no default value is required, but isn\u0027t defined in config file"},{"line_number":65,"context_line":"- Option doesn\u0027t exist in section but found in another"},{"line_number":66,"context_line":"- Option value is not in range: i.e. not in valid choices"},{"line_number":67,"context_line":"- Option is of wrong type: i.e. IntType and string option value"},{"line_number":68,"context_line":"- Section not known in namespaces"}],"source_content_type":"text/x-rst","patch_set":52,"id":"bff0334d_df451e19","line":65,"in_reply_to":"bff0334d_a69f20b3","updated":"2017-04-06 17:14:40.000000000","message":"Yes, I\u0027m not sure how we can support cinder with this short of changing the way they utilize the conf file. Allowing a user to ignore errors would defeat the purpose of this endeavor. I plan to work with the cinder team and resolve this hurdle.","commit_id":"890351681e3144a5ff6af10de1a6c53e8f4e9e4b"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"4898091ba737c832f4f2963a571a7bdac4547049","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":"- Option is set in config file but no value given"},{"line_number":64,"context_line":"- Option with no default value is required, but isn\u0027t defined in config file"},{"line_number":65,"context_line":"- Option doesn\u0027t exist in section but found in another"},{"line_number":66,"context_line":"- Option value is not in range: i.e. not in valid choices"},{"line_number":67,"context_line":"- Option is of wrong type: i.e. IntType and string option value"},{"line_number":68,"context_line":"- Section not known in namespaces"}],"source_content_type":"text/x-rst","patch_set":52,"id":"bff0334d_4c0e073c","line":65,"in_reply_to":"bff0334d_df451e19","updated":"2017-04-06 20:26:55.000000000","message":"We can ask the application (through an entry point) to help figure out which sections are real and need to be validated. The cinder team can use the logic they have for finding backend sections now to implement that hook. \n\nWe could add a similar hook to get the ignore_sections option, since the application developer knows that but the deployer shouldn\u0027t have to.","commit_id":"890351681e3144a5ff6af10de1a6c53e8f4e9e4b"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"acbeac75069905466fc3d91367794be9770b7758","unresolved":false,"context_lines":[{"line_number":65,"context_line":"- Option doesn\u0027t exist in section but found in another"},{"line_number":66,"context_line":"- Option value is not in range: i.e. not in valid choices"},{"line_number":67,"context_line":"- Option is of wrong type: i.e. IntType and string option value"},{"line_number":68,"context_line":"- Section not known in namespaces"},{"line_number":69,"context_line":"- Section misspelled"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"An error indicates a serious problem with the config file that will prevent the"}],"source_content_type":"text/x-rst","patch_set":52,"id":"bff0334d_2694308b","line":68,"updated":"2017-04-05 20:47:46.000000000","message":"This will pose a similar problem for the cinder case.","commit_id":"890351681e3144a5ff6af10de1a6c53e8f4e9e4b"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"4634376ad9d14aa26b2078d29c2ca71df2167f2a","unresolved":false,"context_lines":[{"line_number":65,"context_line":"- Option doesn\u0027t exist in section but found in another"},{"line_number":66,"context_line":"- Option value is not in range: i.e. not in valid choices"},{"line_number":67,"context_line":"- Option is of wrong type: i.e. IntType and string option value"},{"line_number":68,"context_line":"- Section not known in namespaces"},{"line_number":69,"context_line":"- Section misspelled"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"An error indicates a serious problem with the config file that will prevent the"}],"source_content_type":"text/x-rst","patch_set":52,"id":"bff0334d_5f18ee1b","line":68,"in_reply_to":"bff0334d_2694308b","updated":"2017-04-06 17:14:40.000000000","message":"Agreed.","commit_id":"890351681e3144a5ff6af10de1a6c53e8f4e9e4b"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"87d57d168ea71c7beb4e85b8cb758fa203d53803","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"The following errors can be generated against an input file:"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"- Option is set in config file but no value given"},{"line_number":64,"context_line":"- Option with no default value is required, but isn\u0027t defined in config file"},{"line_number":65,"context_line":"- Option doesn\u0027t exist in section but found in another"},{"line_number":66,"context_line":"- Option value is not in range: i.e. not in valid choices"}],"source_content_type":"text/x-rst","patch_set":53,"id":"bff0334d_a96af7af","line":63,"updated":"2017-04-07 18:25:30.000000000","message":"Based on the previous comments, maybe just drop this check for now, and add something in a subsequent patch?","commit_id":"ef8ad8616286367305c5d0eaf818bd98d9d1cea6"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"9553730723e13420b136fbb530c59b11276c3f6c","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"The following errors can be generated against an input file:"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"- Option is set in config file but no value given"},{"line_number":64,"context_line":"- Option with no default value is required, but isn\u0027t defined in config file"},{"line_number":65,"context_line":"- Option doesn\u0027t exist in section but found in another"},{"line_number":66,"context_line":"- Option value is not in range: i.e. not in valid choices"}],"source_content_type":"text/x-rst","patch_set":53,"id":"bff0334d_0c1e916f","line":63,"in_reply_to":"bff0334d_a96af7af","updated":"2017-04-07 19:13:05.000000000","message":"I\u0027m alright with dropping it for the first version, I\u0027d like to get Doug Hellmanns opinion as well.","commit_id":"ef8ad8616286367305c5d0eaf818bd98d9d1cea6"},{"author":{"_account_id":9796,"name":"ChangBo Guo","email":"glongwave@gmail.com","username":"gcb"},"change_message_id":"beb3a498564acb6e3ef5955a676eb071d86032fe","unresolved":false,"context_lines":[{"line_number":41,"context_line":"option types and other validations will still be performed, but the options will"},{"line_number":42,"context_line":"not raise an error if they aren\u0027t in the parent section."},{"line_number":43,"context_line":""},{"line_number":44,"context_line":".. versionadded:: 3.22"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"Return Codes"}],"source_content_type":"text/x-rst","patch_set":55,"id":"3f044301_48406536","line":44,"range":{"start_line":44,"start_character":0,"end_line":44,"end_character":22},"updated":"2017-05-04 11:36:31.000000000","message":"Need change to latest version, current is 4.1","commit_id":"a654beb1d4dd1473bf1bb886d3665e81fc51a9bd"},{"author":{"_account_id":9796,"name":"ChangBo Guo","email":"glongwave@gmail.com","username":"gcb"},"change_message_id":"a96df4bf2849f2281e8f7a5e1fa7c319a501d2a9","unresolved":false,"context_lines":[{"line_number":41,"context_line":"option types and other validations will still be performed, but the options will"},{"line_number":42,"context_line":"not raise an error if they aren\u0027t in the parent section."},{"line_number":43,"context_line":""},{"line_number":44,"context_line":".. versionadded:: 3.22"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"Return Codes"}],"source_content_type":"text/x-rst","patch_set":55,"id":"3f044301_c191d254","line":44,"range":{"start_line":44,"start_character":0,"end_line":44,"end_character":22},"in_reply_to":"3f044301_48406536","updated":"2017-05-05 07:39:09.000000000","message":"Done","commit_id":"a654beb1d4dd1473bf1bb886d3665e81fc51a9bd"}],"oslo_config/tests/test_validator.py":[{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"475ec86f5295c7f28e7f2eafc7c526eb30aa8609","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"class BaseTestCase(base.BaseTestCase):"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    def create_tempfiles(self, files, ext\u003d\u0027.conf\u0027):"},{"line_number":25,"context_line":"        tempfiles \u003d []"},{"line_number":26,"context_line":"        for (basename, contents) in files:"},{"line_number":27,"context_line":"            if not os.path.isabs(basename):"}],"source_content_type":"text/x-python","patch_set":20,"id":"9a629dbe_87866d63","line":24,"updated":"2016-11-09 06:45:59.000000000","message":"This method exists in oslotest, why do we need that ?","commit_id":"b0f502bfaad2a11d1b0b673a13f7687165acb883"},{"author":{"_account_id":19611,"name":"Brian Stajkowski","email":"brian.stajkowski@rackspace.com","username":"ski"},"change_message_id":"cedc83e1ee02a480c853690021ea9f202cd64a53","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"class BaseTestCase(base.BaseTestCase):"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    def create_tempfiles(self, files, ext\u003d\u0027.conf\u0027):"},{"line_number":25,"context_line":"        tempfiles \u003d []"},{"line_number":26,"context_line":"        for (basename, contents) in files:"},{"line_number":27,"context_line":"            if not os.path.isabs(basename):"}],"source_content_type":"text/x-python","patch_set":20,"id":"9a629dbe_30f5be56","line":24,"in_reply_to":"9a629dbe_87866d63","updated":"2016-11-09 16:36:50.000000000","message":"Correct, you caught us in a very very WIP state.  Thank you for the feedback.","commit_id":"b0f502bfaad2a11d1b0b673a13f7687165acb883"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"475ec86f5295c7f28e7f2eafc7c526eb30aa8609","unresolved":false,"context_lines":[{"line_number":43,"context_line":"                        \u0027foo1 \u003d bar1\\n\u0027 \\"},{"line_number":44,"context_line":"                        \u0027[FOOSECTION]\\n\u0027 \\"},{"line_number":45,"context_line":"                        \u0027foo2 \u003d bar2\\n\u0027"},{"line_number":46,"context_line":"    _test_empty_value_config \u003d \u0027[DEFAULT]\\n\u0027 \\"},{"line_number":47,"context_line":"                               \u0027foo1 \u003d bar1\\n\u0027 \\"},{"line_number":48,"context_line":"                               \u0027[FOOSECTION]\\n\u0027 \\"},{"line_number":49,"context_line":"                               \u0027foo2 \u003d\\n\u0027"}],"source_content_type":"text/x-python","patch_set":20,"id":"9a629dbe_07933da4","line":46,"updated":"2016-11-09 06:45:59.000000000","message":"using explicit name instead of foo/bar will increase readability.","commit_id":"b0f502bfaad2a11d1b0b673a13f7687165acb883"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"27ec17c6294608e752b30514aa3437079d9754f8","unresolved":false,"context_lines":[{"line_number":72,"context_line":"    _opts_deprecated \u003d ["},{"line_number":73,"context_line":"        cfg.StrOpt(\u0027foo2\u0027, deprecated_for_removal\u003dTrue, help\u003d\u0027foo2 option\u0027)"},{"line_number":74,"context_line":"    ]"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def test_valid_config(self):"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        opts_config \u003d [(\"namespace1\", ["}],"source_content_type":"text/x-python","patch_set":20,"id":"9a629dbe_67d4f91f","line":75,"updated":"2016-11-09 06:57:56.000000000","message":"test case are missing for option with deprecated_name, deprecated_group and deprecated_opts.","commit_id":"b0f502bfaad2a11d1b0b673a13f7687165acb883"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"475ec86f5295c7f28e7f2eafc7c526eb30aa8609","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        ])]"},{"line_number":97,"context_line":"        input_file \u003d self.create_tempfiles(self._test_base_file)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        _is_valid, _results \u003d \\"},{"line_number":100,"context_line":"            validator.validate(input_file[0], opts_config)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        self.assertEqual(True, _is_valid)"}],"source_content_type":"text/x-python","patch_set":20,"id":"9a629dbe_a77d3170","line":99,"range":{"start_line":99,"start_character":29,"end_line":99,"end_character":31},"updated":"2016-11-09 06:45:59.000000000","message":"use () instead of \\","commit_id":"b0f502bfaad2a11d1b0b673a13f7687165acb883"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"2ac613226a6d040acda42a045b05b82cb5242650","unresolved":false,"context_lines":[{"line_number":11,"context_line":"# the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"from oslotest import base"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from oslo_config import cfg"},{"line_number":16,"context_line":"from oslo_config import types"},{"line_number":17,"context_line":"from oslo_config import validator"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a71b18c_2a1887d2","line":14,"updated":"2016-12-07 20:20:12.000000000","message":"nit: I believe this newline is not needed. Both oslotest and oslo_config are third-party","commit_id":"97b0139528a2e006eacda64e439f647a9c4748f0"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"20b2861d4a533de7f4dc69ab9f601ac95ff73cdf","unresolved":false,"context_lines":[{"line_number":11,"context_line":"# the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"from oslotest import base"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from oslo_config import cfg"},{"line_number":16,"context_line":"from oslo_config import types"},{"line_number":17,"context_line":"from oslo_config import validator"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a71b18c_8b2141ff","line":14,"in_reply_to":"3a71b18c_2a1887d2","updated":"2016-12-08 16:50:15.000000000","message":"Done","commit_id":"97b0139528a2e006eacda64e439f647a9c4748f0"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"2ac613226a6d040acda42a045b05b82cb5242650","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    _test_section_unknown \u003d [(\u0027test\u0027,"},{"line_number":43,"context_line":"                              _test_base_config +"},{"line_number":44,"context_line":"                              \u0027[UNKNOWN]\\n\u0027)]"},{"line_number":45,"context_line":"    _test_opt_unknown_missplaced \u003d [(\u0027test\u0027,"},{"line_number":46,"context_line":"                                     _test_base_config +"},{"line_number":47,"context_line":"                                     \u0027foo3 \u003d bar3\\n\u0027)]"},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":31,"id":"3a71b18c_74c79d64","line":45,"range":{"start_line":45,"start_character":22,"end_line":45,"end_character":32},"updated":"2016-12-07 20:20:12.000000000","message":"typo: misplaced","commit_id":"97b0139528a2e006eacda64e439f647a9c4748f0"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"20b2861d4a533de7f4dc69ab9f601ac95ff73cdf","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    _test_section_unknown \u003d [(\u0027test\u0027,"},{"line_number":43,"context_line":"                              _test_base_config +"},{"line_number":44,"context_line":"                              \u0027[UNKNOWN]\\n\u0027)]"},{"line_number":45,"context_line":"    _test_opt_unknown_missplaced \u003d [(\u0027test\u0027,"},{"line_number":46,"context_line":"                                     _test_base_config +"},{"line_number":47,"context_line":"                                     \u0027foo3 \u003d bar3\\n\u0027)]"},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":31,"id":"3a71b18c_0bf1b16a","line":45,"range":{"start_line":45,"start_character":22,"end_line":45,"end_character":32},"in_reply_to":"3a71b18c_74c79d64","updated":"2016-12-08 16:50:15.000000000","message":"Done","commit_id":"97b0139528a2e006eacda64e439f647a9c4748f0"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"2ac613226a6d040acda42a045b05b82cb5242650","unresolved":false,"context_lines":[{"line_number":259,"context_line":"        input_file \u003d self.create_tempfiles(self._test_base_file)"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"        _is_valid, _results \u003d validator.validate(input_file[0], opts_config)"},{"line_number":262,"context_line":"        print(_results)"},{"line_number":263,"context_line":"        self.assertEqual(False, _is_valid)"},{"line_number":264,"context_line":"        self.assertEqual(1, len(_results[\u0027config_errors\u0027]))"},{"line_number":265,"context_line":"        self.assertEqual(0, len(_results[\u0027config_warnings\u0027]))"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a71b18c_afe3a232","line":262,"updated":"2016-12-07 20:20:12.000000000","message":"This print probably should be removed","commit_id":"97b0139528a2e006eacda64e439f647a9c4748f0"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"20b2861d4a533de7f4dc69ab9f601ac95ff73cdf","unresolved":false,"context_lines":[{"line_number":259,"context_line":"        input_file \u003d self.create_tempfiles(self._test_base_file)"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"        _is_valid, _results \u003d validator.validate(input_file[0], opts_config)"},{"line_number":262,"context_line":"        print(_results)"},{"line_number":263,"context_line":"        self.assertEqual(False, _is_valid)"},{"line_number":264,"context_line":"        self.assertEqual(1, len(_results[\u0027config_errors\u0027]))"},{"line_number":265,"context_line":"        self.assertEqual(0, len(_results[\u0027config_warnings\u0027]))"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a71b18c_4beba978","line":262,"in_reply_to":"3a71b18c_afe3a232","updated":"2016-12-08 16:50:15.000000000","message":"Done","commit_id":"97b0139528a2e006eacda64e439f647a9c4748f0"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"8c136974cfb9e35c045e783ec9437f598dceb77c","unresolved":false,"context_lines":[{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def test_valid_config(self):"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"        opts_config \u003d [(\"namespace1\", ["},{"line_number":117,"context_line":"            (\"DEFAULT\", self._opts_base_default),"},{"line_number":118,"context_line":"            (\"our_section\", self._opts_base_our_section)]),"},{"line_number":119,"context_line":"            (\"namespace2\", ["}],"source_content_type":"text/x-python","patch_set":44,"id":"ba2be162_600c4843","line":116,"updated":"2017-03-01 15:32:57.000000000","message":"If you inserted a line break after the first bracket, then it would be much easier to read the configuration structure, as the indentation would flow more naturally.","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"56c1afcaa5fdeaad5f9c17d28cd36f45236baf4b","unresolved":false,"context_lines":[{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def test_valid_config(self):"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"        opts_config \u003d [(\"namespace1\", ["},{"line_number":117,"context_line":"            (\"DEFAULT\", self._opts_base_default),"},{"line_number":118,"context_line":"            (\"our_section\", self._opts_base_our_section)]),"},{"line_number":119,"context_line":"            (\"namespace2\", ["}],"source_content_type":"text/x-python","patch_set":44,"id":"1a1ced50_4f1dc00e","line":116,"in_reply_to":"ba2be162_600c4843","updated":"2017-03-22 21:20:56.000000000","message":"Done","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"08c34457de3e2cbb22f2a7bf30e88c2332e46469","unresolved":false,"context_lines":[{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    _test_opt_leftover_orphan_config \u003d \u0027\\n\u0027.join(["},{"line_number":93,"context_line":"        _BASE_CONFIG, _BASE_EXTERN, _OPT_ORPHAN_LEFTOVER])"},{"line_number":94,"context_line":"    _test_opt_leftover_orphan_config \u003d [(\u0027test\u0027,"},{"line_number":95,"context_line":"                                         _test_opt_leftover_orphan_config)]"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    _opts_base_default \u003d ["}],"source_content_type":"text/x-python","patch_set":45,"id":"1a1ced50_2a718044","line":94,"updated":"2017-03-22 21:45:05.000000000","message":"Slipped on the naming here, will correct in next PS.","commit_id":"da07b81fc85623a3533935e70c81ec9f87d08b0f"},{"author":{"_account_id":9796,"name":"ChangBo Guo","email":"glongwave@gmail.com","username":"gcb"},"change_message_id":"beb3a498564acb6e3ef5955a676eb071d86032fe","unresolved":false,"context_lines":[{"line_number":13,"context_line":"from oslo_config import cfg"},{"line_number":14,"context_line":"from oslo_config import types"},{"line_number":15,"context_line":"from oslo_config import validator"},{"line_number":16,"context_line":"from oslotest import base"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"_BASE_CONFIG \u003d \u0027\u0027\u0027\\"}],"source_content_type":"text/x-python","patch_set":55,"id":"3f044301_a89fe9b2","line":16,"range":{"start_line":16,"start_character":0,"end_line":16,"end_character":25},"updated":"2017-05-04 11:36:31.000000000","message":"This Line should be in line 13.","commit_id":"a654beb1d4dd1473bf1bb886d3665e81fc51a9bd"},{"author":{"_account_id":9796,"name":"ChangBo Guo","email":"glongwave@gmail.com","username":"gcb"},"change_message_id":"beb3a498564acb6e3ef5955a676eb071d86032fe","unresolved":false,"context_lines":[{"line_number":23,"context_line":"[our_section]"},{"line_number":24,"context_line":"url \u003d http://xyz\u0027\u0027\u0027"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"_BASE_VALUE \u003d \u0027framework \u003d new\u0027"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"_DEFAULT_VALUE \u003d \u0027framework \u003d old\u0027"},{"line_number":29,"context_line":""}],"source_content_type":"text/x-python","patch_set":55,"id":"3f044301_48f865c3","line":26,"range":{"start_line":26,"start_character":0,"end_line":26,"end_character":31},"updated":"2017-05-04 11:36:31.000000000","message":"Need add test with comment in config file","commit_id":"a654beb1d4dd1473bf1bb886d3665e81fc51a9bd"},{"author":{"_account_id":9796,"name":"ChangBo Guo","email":"glongwave@gmail.com","username":"gcb"},"change_message_id":"a96df4bf2849f2281e8f7a5e1fa7c319a501d2a9","unresolved":false,"context_lines":[{"line_number":23,"context_line":"[our_section]"},{"line_number":24,"context_line":"url \u003d http://xyz\u0027\u0027\u0027"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"_BASE_VALUE \u003d \u0027framework \u003d new\u0027"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"_DEFAULT_VALUE \u003d \u0027framework \u003d old\u0027"},{"line_number":29,"context_line":""}],"source_content_type":"text/x-python","patch_set":55,"id":"3f044301_01b7bad7","line":26,"range":{"start_line":26,"start_character":0,"end_line":26,"end_character":31},"in_reply_to":"3f044301_48f865c3","updated":"2017-05-05 07:39:09.000000000","message":"Done","commit_id":"a654beb1d4dd1473bf1bb886d3665e81fc51a9bd"}],"oslo_config/validator.py":[{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"e8d0190f856fcbf0a4725d6c3cae99e4829d04ef","unresolved":false,"context_lines":[{"line_number":13,"context_line":""},{"line_number":14,"context_line":"\"\"\""},{"line_number":15,"context_line":"Oslo config validator reports on the following discrepancies:"},{"line_number":16,"context_line":"* Option not in namespace(error)"},{"line_number":17,"context_line":"* Option has no value(error)"},{"line_number":18,"context_line":"* Option has no value and is required(error)"},{"line_number":19,"context_line":"* Option value is not in range(error)"},{"line_number":20,"context_line":"* Option value is default, not required in config(warning)"},{"line_number":21,"context_line":"* Option is deprecated(warning)"},{"line_number":22,"context_line":"* Option is advanced(warning)"},{"line_number":23,"context_line":"* Option type validation, i.e. \u00272\u0027 vs 2(error)"},{"line_number":24,"context_line":"* Invalid namespace(error)"},{"line_number":25,"context_line":"* Missing namespace(warning)"},{"line_number":26,"context_line":"\"\"\""},{"line_number":27,"context_line":"import logging"},{"line_number":28,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"fa6399be_b6c76144","line":25,"range":{"start_line":16,"start_character":0,"end_line":25,"end_character":28},"updated":"2016-10-11 16:09:08.000000000","message":"There is missing whitespace between word and bracket","commit_id":"132b7649f279703d4a8e4821ba31858e37caaadb"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"92a1fe5869085fdef10d648d86bd474f0032dcf1","unresolved":false,"context_lines":[{"line_number":13,"context_line":""},{"line_number":14,"context_line":"\"\"\""},{"line_number":15,"context_line":"Oslo config validator reports on the following discrepancies:"},{"line_number":16,"context_line":"* Option not in namespace(error)"},{"line_number":17,"context_line":"* Option has no value(error)"},{"line_number":18,"context_line":"* Option has no value and is required(error)"},{"line_number":19,"context_line":"* Option value is not in range(error)"},{"line_number":20,"context_line":"* Option value is default, not required in config(warning)"},{"line_number":21,"context_line":"* Option is deprecated(warning)"},{"line_number":22,"context_line":"* Option is advanced(warning)"},{"line_number":23,"context_line":"* Option type validation, i.e. \u00272\u0027 vs 2(error)"},{"line_number":24,"context_line":"* Invalid namespace(error)"},{"line_number":25,"context_line":"* Missing namespace(warning)"},{"line_number":26,"context_line":"\"\"\""},{"line_number":27,"context_line":"import logging"},{"line_number":28,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"fa6399be_9868c3f7","line":25,"range":{"start_line":16,"start_character":0,"end_line":25,"end_character":28},"in_reply_to":"fa6399be_b6c76144","updated":"2016-10-11 19:23:20.000000000","message":"This is just for my reference while it\u0027s WIP.","commit_id":"132b7649f279703d4a8e4821ba31858e37caaadb"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"e8d0190f856fcbf0a4725d6c3cae99e4829d04ef","unresolved":false,"context_lines":[{"line_number":31,"context_line":"from oslo_config import cfg"},{"line_number":32,"context_line":"from oslo_config.generator import _get_groups"},{"line_number":33,"context_line":"from oslo_config.generator import _list_opts"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"from six.moves import configparser as ConfigParser"},{"line_number":36,"context_line":"import stevedore.named  # noqa"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"LOG \u003d logging.getLogger(__name__)"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa6399be_56e8c57c","line":36,"range":{"start_line":34,"start_character":0,"end_line":36,"end_character":30},"updated":"2016-10-11 16:09:08.000000000","message":"Imports should be organized in different order: stdlib, third-party, project imports [1]\n\n[1] http://docs.openstack.org/developer/hacking/#real-world-import-order-examples","commit_id":"132b7649f279703d4a8e4821ba31858e37caaadb"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"92a1fe5869085fdef10d648d86bd474f0032dcf1","unresolved":false,"context_lines":[{"line_number":31,"context_line":"from oslo_config import cfg"},{"line_number":32,"context_line":"from oslo_config.generator import _get_groups"},{"line_number":33,"context_line":"from oslo_config.generator import _list_opts"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"from six.moves import configparser as ConfigParser"},{"line_number":36,"context_line":"import stevedore.named  # noqa"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"LOG \u003d logging.getLogger(__name__)"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa6399be_cde8bb7f","line":36,"range":{"start_line":34,"start_character":0,"end_line":36,"end_character":30},"in_reply_to":"fa6399be_56e8c57c","updated":"2016-10-11 19:23:20.000000000","message":"Done","commit_id":"132b7649f279703d4a8e4821ba31858e37caaadb"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"e8d0190f856fcbf0a4725d6c3cae99e4829d04ef","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"def _make_sections(config):"},{"line_number":54,"context_line":"    actual_conf \u003d {}"},{"line_number":55,"context_line":"    for section in config.sections():"},{"line_number":56,"context_line":"        actual_conf[section] \u003d config.items(section)"},{"line_number":57,"context_line":"    return actual_conf"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"fa6399be_f655591d","line":56,"range":{"start_line":55,"start_character":0,"end_line":56,"end_character":52},"updated":"2016-10-11 16:09:08.000000000","message":"It can be replaced, using dict comprehension\n\n actual_conf \u003d {section: config.items(section) for section in config.sections()}","commit_id":"132b7649f279703d4a8e4821ba31858e37caaadb"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"92a1fe5869085fdef10d648d86bd474f0032dcf1","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"def _make_sections(config):"},{"line_number":54,"context_line":"    actual_conf \u003d {}"},{"line_number":55,"context_line":"    for section in config.sections():"},{"line_number":56,"context_line":"        actual_conf[section] \u003d config.items(section)"},{"line_number":57,"context_line":"    return actual_conf"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"fa6399be_adf38772","line":56,"range":{"start_line":55,"start_character":0,"end_line":56,"end_character":52},"in_reply_to":"fa6399be_f655591d","updated":"2016-10-11 19:23:20.000000000","message":"Done","commit_id":"132b7649f279703d4a8e4821ba31858e37caaadb"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"e8d0190f856fcbf0a4725d6c3cae99e4829d04ef","unresolved":false,"context_lines":[{"line_number":59,"context_line":""},{"line_number":60,"context_line":"def _parse_config_file(config_file):"},{"line_number":61,"context_line":"    try:"},{"line_number":62,"context_line":"        config \u003d ConfigParser.SafeConfigParser(allow_no_value\u003dTrue)"},{"line_number":63,"context_line":"        config.read(config_file)"},{"line_number":64,"context_line":"        defaults \u003d config.defaults()"},{"line_number":65,"context_line":"        _c \u003d _make_sections(config)"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa6399be_d193ffa1","line":62,"range":{"start_line":62,"start_character":0,"end_line":62,"end_character":67},"updated":"2016-10-11 16:09:08.000000000","message":"I believe, just this line should be wrapped in try/except.\n\n try:\n     config \u003d ...SafeConfigParser\n except (...):\n     config \u003d ...RawConfigParser\n config.read(config_file)\n defaults \u003d config.defaults()\n _c \u003d _make_sections(config)\n return _c, defaults","commit_id":"132b7649f279703d4a8e4821ba31858e37caaadb"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"92a1fe5869085fdef10d648d86bd474f0032dcf1","unresolved":false,"context_lines":[{"line_number":59,"context_line":""},{"line_number":60,"context_line":"def _parse_config_file(config_file):"},{"line_number":61,"context_line":"    try:"},{"line_number":62,"context_line":"        config \u003d ConfigParser.SafeConfigParser(allow_no_value\u003dTrue)"},{"line_number":63,"context_line":"        config.read(config_file)"},{"line_number":64,"context_line":"        defaults \u003d config.defaults()"},{"line_number":65,"context_line":"        _c \u003d _make_sections(config)"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa6399be_38ab371f","line":62,"range":{"start_line":62,"start_character":0,"end_line":62,"end_character":67},"in_reply_to":"fa6399be_d193ffa1","updated":"2016-10-11 19:23:20.000000000","message":"The failures don\u0027t happen until _make_sections. I\u0027ll find a more elegant solution.","commit_id":"132b7649f279703d4a8e4821ba31858e37caaadb"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"e8d0190f856fcbf0a4725d6c3cae99e4829d04ef","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        config \u003d ConfigParser.RawConfigParser(allow_no_value\u003dTrue)"},{"line_number":69,"context_line":"        config.read(config_file)"},{"line_number":70,"context_line":"        defaults \u003d config.defaults()"},{"line_number":71,"context_line":"        _c \u003d _make_sections(config)"},{"line_number":72,"context_line":"    return _c, defaults"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"fa6399be_f11ac316","line":71,"range":{"start_line":71,"start_character":8,"end_line":71,"end_character":10},"updated":"2016-10-11 16:09:08.000000000","message":"Usual usage of underscore, is when variable is considered as throwaway. In this case, it\u0027s returned from function.\nBetter idea is to rename it, and remove preceding underscore.","commit_id":"132b7649f279703d4a8e4821ba31858e37caaadb"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"92a1fe5869085fdef10d648d86bd474f0032dcf1","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        config \u003d ConfigParser.RawConfigParser(allow_no_value\u003dTrue)"},{"line_number":69,"context_line":"        config.read(config_file)"},{"line_number":70,"context_line":"        defaults \u003d config.defaults()"},{"line_number":71,"context_line":"        _c \u003d _make_sections(config)"},{"line_number":72,"context_line":"    return _c, defaults"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"fa6399be_8deec389","line":71,"range":{"start_line":71,"start_character":8,"end_line":71,"end_character":10},"in_reply_to":"fa6399be_f11ac316","updated":"2016-10-11 19:23:20.000000000","message":"Done","commit_id":"132b7649f279703d4a8e4821ba31858e37caaadb"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"e8d0190f856fcbf0a4725d6c3cae99e4829d04ef","unresolved":false,"context_lines":[{"line_number":83,"context_line":"    default_valid \u003d groups.pop(\u0027DEFAULT\u0027)"},{"line_number":84,"context_line":"    ns_v \u003d {}"},{"line_number":85,"context_line":"    for namespace, listing in default_valid[\u0027namespaces\u0027]:"},{"line_number":86,"context_line":"        if namespace not in ns_v:"},{"line_number":87,"context_line":"            ns_v[namespace] \u003d {}"},{"line_number":88,"context_line":"        for opt in listing:"},{"line_number":89,"context_line":"            ns_v[namespace][opt.dest] \u003d opt"},{"line_number":90,"context_line":"    LOG.debug(\u0027VALIDATING: {}\u0027.format(\u0027*\u0027*65))"},{"line_number":91,"context_line":"    for k, opt in ns_v[conf.namespace].items():"},{"line_number":92,"context_line":"        LOG.debug(\u0027\\t{}: {}\u0027.format(k, debu(opt)))"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa6399be_3160bb35","line":89,"range":{"start_line":86,"start_character":0,"end_line":89,"end_character":43},"updated":"2016-10-11 16:09:08.000000000","message":"This can be replaced with setdefault [1]\n\n for opt in listing:\n     ns_v.setdefault(namespace, {})[opt.dest] \u003d opt\n\n[1] https://docs.python.org/2/library/stdtypes.html#dict.setdefault","commit_id":"132b7649f279703d4a8e4821ba31858e37caaadb"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"92a1fe5869085fdef10d648d86bd474f0032dcf1","unresolved":false,"context_lines":[{"line_number":83,"context_line":"    default_valid \u003d groups.pop(\u0027DEFAULT\u0027)"},{"line_number":84,"context_line":"    ns_v \u003d {}"},{"line_number":85,"context_line":"    for namespace, listing in default_valid[\u0027namespaces\u0027]:"},{"line_number":86,"context_line":"        if namespace not in ns_v:"},{"line_number":87,"context_line":"            ns_v[namespace] \u003d {}"},{"line_number":88,"context_line":"        for opt in listing:"},{"line_number":89,"context_line":"            ns_v[namespace][opt.dest] \u003d opt"},{"line_number":90,"context_line":"    LOG.debug(\u0027VALIDATING: {}\u0027.format(\u0027*\u0027*65))"},{"line_number":91,"context_line":"    for k, opt in ns_v[conf.namespace].items():"},{"line_number":92,"context_line":"        LOG.debug(\u0027\\t{}: {}\u0027.format(k, debu(opt)))"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa6399be_f8db7feb","line":89,"range":{"start_line":86,"start_character":0,"end_line":89,"end_character":43},"in_reply_to":"fa6399be_3160bb35","updated":"2016-10-11 19:23:20.000000000","message":"Done","commit_id":"132b7649f279703d4a8e4821ba31858e37caaadb"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"e8d0190f856fcbf0a4725d6c3cae99e4829d04ef","unresolved":false,"context_lines":[{"line_number":87,"context_line":"            ns_v[namespace] \u003d {}"},{"line_number":88,"context_line":"        for opt in listing:"},{"line_number":89,"context_line":"            ns_v[namespace][opt.dest] \u003d opt"},{"line_number":90,"context_line":"    LOG.debug(\u0027VALIDATING: {}\u0027.format(\u0027*\u0027*65))"},{"line_number":91,"context_line":"    for k, opt in ns_v[conf.namespace].items():"},{"line_number":92,"context_line":"        LOG.debug(\u0027\\t{}: {}\u0027.format(k, debu(opt)))"},{"line_number":93,"context_line":"    LOG.debug(\u0027#\u0027*80)"},{"line_number":94,"context_line":"    LOG.debug(\u0027DEFAULTS {}\u0027.format(\u0027*\u0027*65))"},{"line_number":95,"context_line":"    for k, v in input_defaults.items():"},{"line_number":96,"context_line":"        LOG.debug(\u0027\\t{} \u003d {}\u0027.format(k, v))"},{"line_number":97,"context_line":"    for k, v in input_config.items():"},{"line_number":98,"context_line":"        LOG.debug(\u0027{} {}\u0027.format(k, \u0027*\u0027*65))"},{"line_number":99,"context_line":"        for prop, val in v:"},{"line_number":100,"context_line":"            if prop not in input_defaults:"},{"line_number":101,"context_line":"                LOG.debug(\u0027\\t{} \u003d {}\u0027.format(prop, val))"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"def debu(opt):"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa6399be_9140a758","line":101,"range":{"start_line":90,"start_character":0,"end_line":101,"end_character":56},"updated":"2016-10-11 16:09:08.000000000","message":"This code seems to be just printing debug info. I don\u0027t see any part about validation.\nDid I miss something?","commit_id":"132b7649f279703d4a8e4821ba31858e37caaadb"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"92a1fe5869085fdef10d648d86bd474f0032dcf1","unresolved":false,"context_lines":[{"line_number":87,"context_line":"            ns_v[namespace] \u003d {}"},{"line_number":88,"context_line":"        for opt in listing:"},{"line_number":89,"context_line":"            ns_v[namespace][opt.dest] \u003d opt"},{"line_number":90,"context_line":"    LOG.debug(\u0027VALIDATING: {}\u0027.format(\u0027*\u0027*65))"},{"line_number":91,"context_line":"    for k, opt in ns_v[conf.namespace].items():"},{"line_number":92,"context_line":"        LOG.debug(\u0027\\t{}: {}\u0027.format(k, debu(opt)))"},{"line_number":93,"context_line":"    LOG.debug(\u0027#\u0027*80)"},{"line_number":94,"context_line":"    LOG.debug(\u0027DEFAULTS {}\u0027.format(\u0027*\u0027*65))"},{"line_number":95,"context_line":"    for k, v in input_defaults.items():"},{"line_number":96,"context_line":"        LOG.debug(\u0027\\t{} \u003d {}\u0027.format(k, v))"},{"line_number":97,"context_line":"    for k, v in input_config.items():"},{"line_number":98,"context_line":"        LOG.debug(\u0027{} {}\u0027.format(k, \u0027*\u0027*65))"},{"line_number":99,"context_line":"        for prop, val in v:"},{"line_number":100,"context_line":"            if prop not in input_defaults:"},{"line_number":101,"context_line":"                LOG.debug(\u0027\\t{} \u003d {}\u0027.format(prop, val))"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"def debu(opt):"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa6399be_38fdf73a","line":101,"range":{"start_line":90,"start_character":0,"end_line":101,"end_character":56},"in_reply_to":"fa6399be_9140a758","updated":"2016-10-11 19:23:20.000000000","message":"Yeah, just debugging with this ps to make sure I\u0027m comparing the right sets of data.","commit_id":"132b7649f279703d4a8e4821ba31858e37caaadb"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"e8d0190f856fcbf0a4725d6c3cae99e4829d04ef","unresolved":false,"context_lines":[{"line_number":106,"context_line":"    if opt.required:"},{"line_number":107,"context_line":"        m +\u003d \u0027 REQUIRED\u0027"},{"line_number":108,"context_line":"    if opt.deprecated_for_removal:"},{"line_number":109,"context_line":"        m +\u003d \u0027 DEPRICATED\u0027"},{"line_number":110,"context_line":"    if opt.advanced:"},{"line_number":111,"context_line":"        m +\u003d \u0027 ADVANCED\u0027"},{"line_number":112,"context_line":"    if opt.positional:"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa6399be_f181e390","line":109,"range":{"start_line":109,"start_character":15,"end_line":109,"end_character":25},"updated":"2016-10-11 16:09:08.000000000","message":"typo: DEPRECATED","commit_id":"132b7649f279703d4a8e4821ba31858e37caaadb"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"92a1fe5869085fdef10d648d86bd474f0032dcf1","unresolved":false,"context_lines":[{"line_number":106,"context_line":"    if opt.required:"},{"line_number":107,"context_line":"        m +\u003d \u0027 REQUIRED\u0027"},{"line_number":108,"context_line":"    if opt.deprecated_for_removal:"},{"line_number":109,"context_line":"        m +\u003d \u0027 DEPRICATED\u0027"},{"line_number":110,"context_line":"    if opt.advanced:"},{"line_number":111,"context_line":"        m +\u003d \u0027 ADVANCED\u0027"},{"line_number":112,"context_line":"    if opt.positional:"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa6399be_47d80d54","line":109,"range":{"start_line":109,"start_character":15,"end_line":109,"end_character":25},"in_reply_to":"fa6399be_f181e390","updated":"2016-10-11 19:23:20.000000000","message":"Done","commit_id":"132b7649f279703d4a8e4821ba31858e37caaadb"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"e2cc2679abec2495c5821f837c7580ac014e3ac9","unresolved":false,"context_lines":[{"line_number":40,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"_validator_opts \u003d ["},{"line_number":43,"context_line":"    cfg.ListOpt(\u0027namespace\u0027,"},{"line_number":44,"context_line":"                help\u003d\u0027Namespace in configuration to validate\u0027),"},{"line_number":45,"context_line":"    cfg.StrOpt(\u0027conf_file\u0027,"},{"line_number":46,"context_line":"               help\u003d\u0027Configuration file to validate\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa6399be_7bc014e1","line":43,"range":{"start_line":43,"start_character":5,"end_line":43,"end_character":15},"updated":"2016-10-12 21:01:04.000000000","message":"This should be a cfg.MultiStrOpt like the oslo-config-generator. This will allow to use the same config file for generation and validation.","commit_id":"54044a8be802259a05d0c1ea2dabb203ba5351ad"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"1c24803b99da448c376c1008afe83af1ccd18b45","unresolved":false,"context_lines":[{"line_number":40,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"_validator_opts \u003d ["},{"line_number":43,"context_line":"    cfg.ListOpt(\u0027namespace\u0027,"},{"line_number":44,"context_line":"                help\u003d\u0027Namespace in configuration to validate\u0027),"},{"line_number":45,"context_line":"    cfg.StrOpt(\u0027conf_file\u0027,"},{"line_number":46,"context_line":"               help\u003d\u0027Configuration file to validate\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa6399be_ac3ec9d7","line":43,"range":{"start_line":43,"start_character":5,"end_line":43,"end_character":15},"in_reply_to":"fa6399be_7bc014e1","updated":"2016-10-13 18:51:14.000000000","message":"Done","commit_id":"54044a8be802259a05d0c1ea2dabb203ba5351ad"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"e2cc2679abec2495c5821f837c7580ac014e3ac9","unresolved":false,"context_lines":[{"line_number":42,"context_line":"_validator_opts \u003d ["},{"line_number":43,"context_line":"    cfg.ListOpt(\u0027namespace\u0027,"},{"line_number":44,"context_line":"                help\u003d\u0027Namespace in configuration to validate\u0027),"},{"line_number":45,"context_line":"    cfg.StrOpt(\u0027conf_file\u0027,"},{"line_number":46,"context_line":"               help\u003d\u0027Configuration file to validate\u0027)"},{"line_number":47,"context_line":"    ]"},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"fa6399be_5b1350b8","line":45,"updated":"2016-10-12 21:01:04.000000000","message":"This generates --conf_file we already have --config-dir, --config-file, this is confusing... What about --input-file ?\n\nI would imagine the same syntax as generator:\n\n    oslo-config-validator --config-file ~/stack/gnocchi/etc/gnocchi/gnocchi-config-generator.conf --input-file /etc/gnocchi/gnocchi.conf\n\nnamespaces will be read from the configuration config-generator config file.","commit_id":"54044a8be802259a05d0c1ea2dabb203ba5351ad"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"1c24803b99da448c376c1008afe83af1ccd18b45","unresolved":false,"context_lines":[{"line_number":42,"context_line":"_validator_opts \u003d ["},{"line_number":43,"context_line":"    cfg.ListOpt(\u0027namespace\u0027,"},{"line_number":44,"context_line":"                help\u003d\u0027Namespace in configuration to validate\u0027),"},{"line_number":45,"context_line":"    cfg.StrOpt(\u0027conf_file\u0027,"},{"line_number":46,"context_line":"               help\u003d\u0027Configuration file to validate\u0027)"},{"line_number":47,"context_line":"    ]"},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"fa6399be_cdfa1775","line":45,"in_reply_to":"fa6399be_5b1350b8","updated":"2016-10-13 18:51:14.000000000","message":"Done","commit_id":"54044a8be802259a05d0c1ea2dabb203ba5351ad"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"e2cc2679abec2495c5821f837c7580ac014e3ac9","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"def _parse_config_file(config_file):"},{"line_number":62,"context_line":"    try:"},{"line_number":63,"context_line":"        config \u003d ConfigParser.SafeConfigParser(allow_no_value\u003dTrue)"},{"line_number":64,"context_line":"        config.read(config_file)"},{"line_number":65,"context_line":"        defaults \u003d config.defaults()"},{"line_number":66,"context_line":"        c \u003d {section: config.items(section) for section in config.sections()}"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa6399be_9eff9666","line":63,"updated":"2016-10-12 21:01:04.000000000","message":"We should not use the python ConfigParser. oslo_config have its own iniparser, we should read the file with the same parser.\n\nFor example the python parser allow line without \u003d when the oslo_config doesn\u0027t. The validator must fail like the oslo_config.cfg one.","commit_id":"54044a8be802259a05d0c1ea2dabb203ba5351ad"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"1c24803b99da448c376c1008afe83af1ccd18b45","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"def _parse_config_file(config_file):"},{"line_number":62,"context_line":"    try:"},{"line_number":63,"context_line":"        config \u003d ConfigParser.SafeConfigParser(allow_no_value\u003dTrue)"},{"line_number":64,"context_line":"        config.read(config_file)"},{"line_number":65,"context_line":"        defaults \u003d config.defaults()"},{"line_number":66,"context_line":"        c \u003d {section: config.items(section) for section in config.sections()}"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa6399be_e98b48c1","line":63,"in_reply_to":"fa6399be_9eff9666","updated":"2016-10-13 18:51:14.000000000","message":"Done","commit_id":"54044a8be802259a05d0c1ea2dabb203ba5351ad"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"27ec17c6294608e752b30514aa3437079d9754f8","unresolved":false,"context_lines":[{"line_number":37,"context_line":"                    required\u003dTrue,"},{"line_number":38,"context_line":"                    help\u003d\u0027Option namespace under \"oslo.config.opts\" in which \u0027"},{"line_number":39,"context_line":"                         \u0027to query for options.\u0027),"},{"line_number":40,"context_line":"    cfg.StrOpt(\u0027input_file\u0027,"},{"line_number":41,"context_line":"               help\u003d\u0027Configuration file to validate\u0027)"},{"line_number":42,"context_line":"]"},{"line_number":43,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"9a629dbe_e773a97e","line":40,"range":{"start_line":40,"start_character":21,"end_line":40,"end_character":23},"updated":"2016-11-09 06:57:56.000000000","message":"Should be input-file instead of input_file.","commit_id":"b0f502bfaad2a11d1b0b673a13f7687165acb883"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"475ec86f5295c7f28e7f2eafc7c526eb30aa8609","unresolved":false,"context_lines":[{"line_number":294,"context_line":"    register_cli_opts(conf)"},{"line_number":295,"context_line":"    conf(args, version\u003dversion)"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"    return validate(conf.input_file, _list_opts(conf.namespace))"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":""},{"line_number":300,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"}],"source_content_type":"text/x-python","patch_set":20,"id":"9a629dbe_87ed8d27","line":297,"updated":"2016-11-09 06:45:59.000000000","message":"Why main doesn\u0027t show the report ?","commit_id":"b0f502bfaad2a11d1b0b673a13f7687165acb883"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"4b4da12ae4fb2cb7168fb332d8bb30827204e80e","unresolved":false,"context_lines":[{"line_number":37,"context_line":"                    required\u003dTrue,"},{"line_number":38,"context_line":"                    help\u003d\u0027Option namespace under \"oslo.config.opts\" in which \u0027"},{"line_number":39,"context_line":"                         \u0027to query for options.\u0027),"},{"line_number":40,"context_line":"    cfg.StrOpt(\u0027input_file\u0027,"},{"line_number":41,"context_line":"               help\u003d\u0027Configuration file to validate\u0027)"},{"line_number":42,"context_line":"]"},{"line_number":43,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"3a71b18c_2879b7c8","line":40,"range":{"start_line":40,"start_character":21,"end_line":40,"end_character":22},"updated":"2016-12-05 16:25:39.000000000","message":"the _ must be a -","commit_id":"3cf6e3f57fba9900bf05161c29d16015e3ff127e"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"ea3e6fc941e8ea77ac63203df0dbdbe9d2deada8","unresolved":false,"context_lines":[{"line_number":37,"context_line":"                    required\u003dTrue,"},{"line_number":38,"context_line":"                    help\u003d\u0027Option namespace under \"oslo.config.opts\" in which \u0027"},{"line_number":39,"context_line":"                         \u0027to query for options.\u0027),"},{"line_number":40,"context_line":"    cfg.StrOpt(\u0027input_file\u0027,"},{"line_number":41,"context_line":"               help\u003d\u0027Configuration file to validate\u0027)"},{"line_number":42,"context_line":"]"},{"line_number":43,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"3a71b18c_4b67cde8","line":40,"range":{"start_line":40,"start_character":21,"end_line":40,"end_character":22},"in_reply_to":"3a71b18c_2879b7c8","updated":"2016-12-05 18:04:51.000000000","message":"Done","commit_id":"3cf6e3f57fba9900bf05161c29d16015e3ff127e"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"64dd001575fe6968d3f4e776302a4ad8038a4572","unresolved":false,"context_lines":[{"line_number":272,"context_line":"                validate_opt \u003d validate_opts.get(valid_name, False)"},{"line_number":273,"context_line":"                check_choice \u003d True"},{"line_number":274,"context_line":"                if validate_opt:"},{"line_number":275,"context_line":"                    try:"},{"line_number":276,"context_line":"                        if valid_opt.type.choices:"},{"line_number":277,"context_line":"                            for _o in validate_opt:"},{"line_number":278,"context_line":"                                if _o not in valid_opt.type.choices:"}],"source_content_type":"text/x-python","patch_set":29,"id":"3a71b18c_6f1a1170","line":275,"updated":"2016-12-02 21:37:21.000000000","message":"Changed this to hasattr(...","commit_id":"3cf6e3f57fba9900bf05161c29d16015e3ff127e"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"64dd001575fe6968d3f4e776302a4ad8038a4572","unresolved":false,"context_lines":[{"line_number":418,"context_line":""},{"line_number":419,"context_line":"def _opt_type_invalid():"},{"line_number":420,"context_line":"    \"\"\"Option type is invalid.\"\"\""},{"line_number":421,"context_line":"    return \u0027undefined\u0027, \u0027option\u0027, \u0027{} {} is invalid type {}\u0027"},{"line_number":422,"context_line":""},{"line_number":423,"context_line":""},{"line_number":424,"context_line":"def _opt_choice_invalid():"}],"source_content_type":"text/x-python","patch_set":29,"id":"3a71b18c_0f6a7db3","line":421,"updated":"2016-12-02 21:37:21.000000000","message":"The naming here is confusing","commit_id":"3cf6e3f57fba9900bf05161c29d16015e3ff127e"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"2ac613226a6d040acda42a045b05b82cb5242650","unresolved":false,"context_lines":[{"line_number":23,"context_line":"import pkg_resources"},{"line_number":24,"context_line":"from pylev import damerau_levenshtein as dld"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"import stevedore.named  # noqa"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"from oslo_config import cfg"},{"line_number":29,"context_line":"from oslo_config.generator import _get_groups"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a71b18c_6f6eea97","line":26,"updated":"2016-12-07 20:20:12.000000000","message":"Question: could you tell, how and where it is used?","commit_id":"97b0139528a2e006eacda64e439f647a9c4748f0"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"20b2861d4a533de7f4dc69ab9f601ac95ff73cdf","unresolved":false,"context_lines":[{"line_number":23,"context_line":"import pkg_resources"},{"line_number":24,"context_line":"from pylev import damerau_levenshtein as dld"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"import stevedore.named  # noqa"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"from oslo_config import cfg"},{"line_number":29,"context_line":"from oslo_config.generator import _get_groups"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a71b18c_c2a5de47","line":26,"in_reply_to":"3a71b18c_6f6eea97","updated":"2016-12-08 16:50:15.000000000","message":"I don\u0027t see how it\u0027s needed after all, removed - done.","commit_id":"97b0139528a2e006eacda64e439f647a9c4748f0"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"2ac613226a6d040acda42a045b05b82cb5242650","unresolved":false,"context_lines":[{"line_number":74,"context_line":"    :param groups: dict of sections from _get_groups"},{"line_number":75,"context_line":"    :returns dict of namespace sections and options"},{"line_number":76,"context_line":"    \"\"\""},{"line_number":77,"context_line":"    _namespace_opts \u003d {\u0027DEFAULT\u0027: {}}"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    for section, tmp in groups.items():"},{"line_number":80,"context_line":"        if section not in _namespace_opts.keys():"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a71b18c_6d86e814","line":77,"updated":"2016-12-07 20:20:12.000000000","message":"I\u0027m not 100% sure, but I believe this part can be skipped. `DEFAULT` value is always there.","commit_id":"97b0139528a2e006eacda64e439f647a9c4748f0"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"20b2861d4a533de7f4dc69ab9f601ac95ff73cdf","unresolved":false,"context_lines":[{"line_number":74,"context_line":"    :param groups: dict of sections from _get_groups"},{"line_number":75,"context_line":"    :returns dict of namespace sections and options"},{"line_number":76,"context_line":"    \"\"\""},{"line_number":77,"context_line":"    _namespace_opts \u003d {\u0027DEFAULT\u0027: {}}"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    for section, tmp in groups.items():"},{"line_number":80,"context_line":"        if section not in _namespace_opts.keys():"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a71b18c_4270eedc","line":77,"in_reply_to":"3a71b18c_6d86e814","updated":"2016-12-08 16:50:15.000000000","message":"Done","commit_id":"97b0139528a2e006eacda64e439f647a9c4748f0"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"2ac613226a6d040acda42a045b05b82cb5242650","unresolved":false,"context_lines":[{"line_number":76,"context_line":"    \"\"\""},{"line_number":77,"context_line":"    _namespace_opts \u003d {\u0027DEFAULT\u0027: {}}"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    for section, tmp in groups.items():"},{"line_number":80,"context_line":"        if section not in _namespace_opts.keys():"},{"line_number":81,"context_line":"            _namespace_opts.update({section: {}})"},{"line_number":82,"context_line":"        for ns_o in tmp[\u0027namespaces\u0027]:"},{"line_number":83,"context_line":"            opts \u003d ns_o[1]"},{"line_number":84,"context_line":"            for opt in opts:"},{"line_number":85,"context_line":"                _namespace_opts[section].update({opt.dest if opt.dest"},{"line_number":86,"context_line":"                                                 else opt.name: opt})"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    return _namespace_opts"},{"line_number":89,"context_line":""}],"source_content_type":"text/x-python","patch_set":31,"id":"3a71b18c_cd9e1c63","line":86,"range":{"start_line":79,"start_character":0,"end_line":86,"end_character":69},"updated":"2016-12-07 20:20:12.000000000","message":"This can be rewritten, using `setdefault`\n\n for section, tmp in groups.items():\n     for ns_o in tmp[\u0027namespaces\u0027]:\n         _namespace_opts.setdefault(section, {}).update(\n             {opt.dest if opt.dest else opt.name:opt for opt in ns_o[1]})","commit_id":"97b0139528a2e006eacda64e439f647a9c4748f0"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"20b2861d4a533de7f4dc69ab9f601ac95ff73cdf","unresolved":false,"context_lines":[{"line_number":76,"context_line":"    \"\"\""},{"line_number":77,"context_line":"    _namespace_opts \u003d {\u0027DEFAULT\u0027: {}}"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    for section, tmp in groups.items():"},{"line_number":80,"context_line":"        if section not in _namespace_opts.keys():"},{"line_number":81,"context_line":"            _namespace_opts.update({section: {}})"},{"line_number":82,"context_line":"        for ns_o in tmp[\u0027namespaces\u0027]:"},{"line_number":83,"context_line":"            opts \u003d ns_o[1]"},{"line_number":84,"context_line":"            for opt in opts:"},{"line_number":85,"context_line":"                _namespace_opts[section].update({opt.dest if opt.dest"},{"line_number":86,"context_line":"                                                 else opt.name: opt})"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    return _namespace_opts"},{"line_number":89,"context_line":""}],"source_content_type":"text/x-python","patch_set":31,"id":"3a71b18c_42862edc","line":86,"range":{"start_line":79,"start_character":0,"end_line":86,"end_character":69},"in_reply_to":"3a71b18c_cd9e1c63","updated":"2016-12-08 16:50:15.000000000","message":"Done","commit_id":"97b0139528a2e006eacda64e439f647a9c4748f0"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"2ac613226a6d040acda42a045b05b82cb5242650","unresolved":false,"context_lines":[{"line_number":88,"context_line":"    return _namespace_opts"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"def _format_message(_type, _c_item, _c_sect, _i_name, _mess):"},{"line_number":92,"context_line":"    \"\"\"Format result message."},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    :param _type: message type [\u0027repitition\u0027, \u0027complexity\u0027 ,\u0027deprecation\u0027,"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a71b18c_8d01843c","line":91,"range":{"start_line":91,"start_character":20,"end_line":91,"end_character":59},"updated":"2016-12-07 20:20:12.000000000","message":"You are overusing underscore. Especially in func definition, it shouldn\u0027t be a private argument.\nBetter idea is to just name all parameters exactly like they\u0027re used in dict.","commit_id":"97b0139528a2e006eacda64e439f647a9c4748f0"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"20b2861d4a533de7f4dc69ab9f601ac95ff73cdf","unresolved":false,"context_lines":[{"line_number":88,"context_line":"    return _namespace_opts"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"def _format_message(_type, _c_item, _c_sect, _i_name, _mess):"},{"line_number":92,"context_line":"    \"\"\"Format result message."},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    :param _type: message type [\u0027repitition\u0027, \u0027complexity\u0027 ,\u0027deprecation\u0027,"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a71b18c_a51d4c68","line":91,"range":{"start_line":91,"start_character":20,"end_line":91,"end_character":59},"in_reply_to":"3a71b18c_8d01843c","updated":"2016-12-08 16:50:15.000000000","message":"I\u0027m leaving the underscore on _type since it\u0027s a keyword, otherwise: done.","commit_id":"97b0139528a2e006eacda64e439f647a9c4748f0"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"2ac613226a6d040acda42a045b05b82cb5242650","unresolved":false,"context_lines":[{"line_number":91,"context_line":"def _format_message(_type, _c_item, _c_sect, _i_name, _mess):"},{"line_number":92,"context_line":"    \"\"\"Format result message."},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    :param _type: message type [\u0027repitition\u0027, \u0027complexity\u0027 ,\u0027deprecation\u0027,"},{"line_number":95,"context_line":"           \u0027missing\u0027, \u0027spelling\u0027, \u0027misplaced\u0027, \u0027orphan\u0027, \u0027undefined\u0027,"},{"line_number":96,"context_line":"           \u0027invalid\u0027]"},{"line_number":97,"context_line":"    :param _c_item: config item type [\u0027option\u0027, \u0027section\u0027]"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a71b18c_cd753c33","line":94,"range":{"start_line":94,"start_character":33,"end_line":94,"end_character":43},"updated":"2016-12-07 20:20:12.000000000","message":"typo: repetition","commit_id":"97b0139528a2e006eacda64e439f647a9c4748f0"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"20b2861d4a533de7f4dc69ab9f601ac95ff73cdf","unresolved":false,"context_lines":[{"line_number":91,"context_line":"def _format_message(_type, _c_item, _c_sect, _i_name, _mess):"},{"line_number":92,"context_line":"    \"\"\"Format result message."},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    :param _type: message type [\u0027repitition\u0027, \u0027complexity\u0027 ,\u0027deprecation\u0027,"},{"line_number":95,"context_line":"           \u0027missing\u0027, \u0027spelling\u0027, \u0027misplaced\u0027, \u0027orphan\u0027, \u0027undefined\u0027,"},{"line_number":96,"context_line":"           \u0027invalid\u0027]"},{"line_number":97,"context_line":"    :param _c_item: config item type [\u0027option\u0027, \u0027section\u0027]"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a71b18c_653a54cf","line":94,"range":{"start_line":94,"start_character":33,"end_line":94,"end_character":43},"in_reply_to":"3a71b18c_cd753c33","updated":"2016-12-08 16:50:15.000000000","message":"Done","commit_id":"97b0139528a2e006eacda64e439f647a9c4748f0"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"2ac613226a6d040acda42a045b05b82cb5242650","unresolved":false,"context_lines":[{"line_number":126,"context_line":"            sect_suggestions.update({_orp: []})"},{"line_number":127,"context_line":"            for possible_suggestion in valid_sect_set:"},{"line_number":128,"context_line":"                d \u003d dld(_orp, possible_suggestion)"},{"line_number":129,"context_line":"                if d \u003c 3:"},{"line_number":130,"context_line":"                    sect_suggestions[_orp].append(possible_suggestion)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    return sect_suggestions"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a71b18c_10a027a5","line":129,"range":{"start_line":129,"start_character":23,"end_line":129,"end_character":24},"updated":"2016-12-07 20:20:12.000000000","message":"Please define this as constant and locate at the top of file.","commit_id":"97b0139528a2e006eacda64e439f647a9c4748f0"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"20b2861d4a533de7f4dc69ab9f601ac95ff73cdf","unresolved":false,"context_lines":[{"line_number":126,"context_line":"            sect_suggestions.update({_orp: []})"},{"line_number":127,"context_line":"            for possible_suggestion in valid_sect_set:"},{"line_number":128,"context_line":"                d \u003d dld(_orp, possible_suggestion)"},{"line_number":129,"context_line":"                if d \u003c 3:"},{"line_number":130,"context_line":"                    sect_suggestions[_orp].append(possible_suggestion)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    return sect_suggestions"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a71b18c_c5ede8b8","line":129,"range":{"start_line":129,"start_character":23,"end_line":129,"end_character":24},"in_reply_to":"3a71b18c_10a027a5","updated":"2016-12-08 16:50:15.000000000","message":"Done","commit_id":"97b0139528a2e006eacda64e439f647a9c4748f0"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"2ac613226a6d040acda42a045b05b82cb5242650","unresolved":false,"context_lines":[{"line_number":120,"context_line":"    # Any values in orphaned_input_values and orphaned_input_sections are"},{"line_number":121,"context_line":"    # either misspelled and/or weren\u0027t found in that particular valid"},{"line_number":122,"context_line":"    # namespace, or don\u0027t belong in the file."},{"line_number":123,"context_line":"    sect_suggestions \u003d {}"},{"line_number":124,"context_line":"    if orphaned_input_sections:"},{"line_number":125,"context_line":"        for _orp in orphaned_input_sections:"},{"line_number":126,"context_line":"            sect_suggestions.update({_orp: []})"},{"line_number":127,"context_line":"            for possible_suggestion in valid_sect_set:"},{"line_number":128,"context_line":"                d \u003d dld(_orp, possible_suggestion)"},{"line_number":129,"context_line":"                if d \u003c 3:"},{"line_number":130,"context_line":"                    sect_suggestions[_orp].append(possible_suggestion)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    return sect_suggestions"},{"line_number":133,"context_line":""}],"source_content_type":"text/x-python","patch_set":31,"id":"3a71b18c_50a45f07","line":130,"range":{"start_line":123,"start_character":0,"end_line":130,"end_character":70},"updated":"2016-12-07 20:20:12.000000000","message":"This one seems pretty similar to _parse_namespace_config so maybe would be worth to use `setdefault` here?","commit_id":"97b0139528a2e006eacda64e439f647a9c4748f0"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"20b2861d4a533de7f4dc69ab9f601ac95ff73cdf","unresolved":false,"context_lines":[{"line_number":120,"context_line":"    # Any values in orphaned_input_values and orphaned_input_sections are"},{"line_number":121,"context_line":"    # either misspelled and/or weren\u0027t found in that particular valid"},{"line_number":122,"context_line":"    # namespace, or don\u0027t belong in the file."},{"line_number":123,"context_line":"    sect_suggestions \u003d {}"},{"line_number":124,"context_line":"    if orphaned_input_sections:"},{"line_number":125,"context_line":"        for _orp in orphaned_input_sections:"},{"line_number":126,"context_line":"            sect_suggestions.update({_orp: []})"},{"line_number":127,"context_line":"            for possible_suggestion in valid_sect_set:"},{"line_number":128,"context_line":"                d \u003d dld(_orp, possible_suggestion)"},{"line_number":129,"context_line":"                if d \u003c 3:"},{"line_number":130,"context_line":"                    sect_suggestions[_orp].append(possible_suggestion)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    return sect_suggestions"},{"line_number":133,"context_line":""}],"source_content_type":"text/x-python","patch_set":31,"id":"3a71b18c_d6ecbcf5","line":130,"range":{"start_line":123,"start_character":0,"end_line":130,"end_character":70},"in_reply_to":"3a71b18c_50a45f07","updated":"2016-12-08 16:50:15.000000000","message":"Done","commit_id":"97b0139528a2e006eacda64e439f647a9c4748f0"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"2ac613226a6d040acda42a045b05b82cb5242650","unresolved":false,"context_lines":[{"line_number":180,"context_line":"                if dld_dist \u003d\u003d 0:"},{"line_number":181,"context_line":"                    # NOT misspelled, just a different section"},{"line_number":182,"context_line":"                    rehomings[s_o].append(possible_suggestion)"},{"line_number":183,"context_line":"                elif dld_dist \u003c 3:"},{"line_number":184,"context_line":"                    suggestions[s_o].append(possible_suggestion)"},{"line_number":185,"context_line":"            if not rehomings[s_o]:"},{"line_number":186,"context_line":"                del rehomings[s_o]"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a71b18c_b06e9394","line":183,"range":{"start_line":183,"start_character":32,"end_line":183,"end_character":33},"updated":"2016-12-07 20:20:12.000000000","message":"Could you define this value at the top of module, and explain it there?","commit_id":"97b0139528a2e006eacda64e439f647a9c4748f0"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"20b2861d4a533de7f4dc69ab9f601ac95ff73cdf","unresolved":false,"context_lines":[{"line_number":180,"context_line":"                if dld_dist \u003d\u003d 0:"},{"line_number":181,"context_line":"                    # NOT misspelled, just a different section"},{"line_number":182,"context_line":"                    rehomings[s_o].append(possible_suggestion)"},{"line_number":183,"context_line":"                elif dld_dist \u003c 3:"},{"line_number":184,"context_line":"                    suggestions[s_o].append(possible_suggestion)"},{"line_number":185,"context_line":"            if not rehomings[s_o]:"},{"line_number":186,"context_line":"                del rehomings[s_o]"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a71b18c_ab06fd1d","line":183,"range":{"start_line":183,"start_character":32,"end_line":183,"end_character":33},"in_reply_to":"3a71b18c_b06e9394","updated":"2016-12-08 16:50:15.000000000","message":"Done","commit_id":"97b0139528a2e006eacda64e439f647a9c4748f0"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"2ac613226a6d040acda42a045b05b82cb5242650","unresolved":false,"context_lines":[{"line_number":353,"context_line":"    :param validate_opt: config file option"},{"line_number":354,"context_line":"    :returns dict containing the warning/error"},{"line_number":355,"context_line":"    \"\"\""},{"line_number":356,"context_line":"    _result_type, _result_item, _result_message \u003d message()"},{"line_number":357,"context_line":"    m \u003d _result_message.format(valid_section, valid_name, validate_opt)"},{"line_number":358,"context_line":"    _result \u003d _format_message(_result_type, _result_item,"},{"line_number":359,"context_line":"                              valid_section, valid_name, m)"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a71b18c_b0cdb35f","line":356,"range":{"start_line":356,"start_character":32,"end_line":356,"end_character":47},"updated":"2016-12-07 20:20:12.000000000","message":"You are using the same variable name like function name. Please change on of these two to not mix them.","commit_id":"97b0139528a2e006eacda64e439f647a9c4748f0"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"20b2861d4a533de7f4dc69ab9f601ac95ff73cdf","unresolved":false,"context_lines":[{"line_number":353,"context_line":"    :param validate_opt: config file option"},{"line_number":354,"context_line":"    :returns dict containing the warning/error"},{"line_number":355,"context_line":"    \"\"\""},{"line_number":356,"context_line":"    _result_type, _result_item, _result_message \u003d message()"},{"line_number":357,"context_line":"    m \u003d _result_message.format(valid_section, valid_name, validate_opt)"},{"line_number":358,"context_line":"    _result \u003d _format_message(_result_type, _result_item,"},{"line_number":359,"context_line":"                              valid_section, valid_name, m)"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a71b18c_167714a0","line":356,"range":{"start_line":356,"start_character":32,"end_line":356,"end_character":47},"in_reply_to":"3a71b18c_b0cdb35f","updated":"2016-12-08 16:50:15.000000000","message":"Done","commit_id":"97b0139528a2e006eacda64e439f647a9c4748f0"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"eab3cd516b99558420a4b8f16469a7b630119ed4","unresolved":false,"context_lines":[{"line_number":18,"context_line":".. versionadded:: 1.8"},{"line_number":19,"context_line":"\"\"\""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from itertools import chain"},{"line_number":22,"context_line":"import logging"},{"line_number":23,"context_line":"import pkg_resources"},{"line_number":24,"context_line":"from pylev import damerau_levenshtein as dld"},{"line_number":25,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"3a71b18c_fa87685e","line":22,"range":{"start_line":21,"start_character":0,"end_line":22,"end_character":14},"updated":"2016-12-12 23:45:48.000000000","message":"These two are stdlibs. Between them and two others should be newline. [1].\nAdditional thing, you shouldn\u0027t import object (like chains) but instead module.\n\n[1] http://docs.openstack.org/developer/hacking/#imports","commit_id":"2f0f5543c9fafa8d8c9fc718804221196697571f"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"3296ccbb5620572f14e420b21c24c5697c1675bd","unresolved":false,"context_lines":[{"line_number":18,"context_line":".. versionadded:: 1.8"},{"line_number":19,"context_line":"\"\"\""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from itertools import chain"},{"line_number":22,"context_line":"import logging"},{"line_number":23,"context_line":"import pkg_resources"},{"line_number":24,"context_line":"from pylev import damerau_levenshtein as dld"},{"line_number":25,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"1a6eadb0_8192069e","line":22,"range":{"start_line":21,"start_character":0,"end_line":22,"end_character":14},"in_reply_to":"3a71b18c_fa87685e","updated":"2016-12-14 21:34:24.000000000","message":"Done","commit_id":"2f0f5543c9fafa8d8c9fc718804221196697571f"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"eab3cd516b99558420a4b8f16469a7b630119ed4","unresolved":false,"context_lines":[{"line_number":24,"context_line":"from pylev import damerau_levenshtein as dld"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"from oslo_config import cfg"},{"line_number":27,"context_line":"from oslo_config.generator import _get_groups"},{"line_number":28,"context_line":"from oslo_config.generator import _list_opts"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"LOG \u003d logging.getLogger(__name__)"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a6eadb0_b60946e0","line":28,"range":{"start_line":27,"start_character":0,"end_line":28,"end_character":44},"updated":"2016-12-12 23:45:48.000000000","message":"I\u0027m not convinced, these two should be imported from generator.\nI would leave it as is, but we need to think about refactoring this piece. Especially, if you\u0027re using private functions imported from generator in your validator.","commit_id":"2f0f5543c9fafa8d8c9fc718804221196697571f"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"3296ccbb5620572f14e420b21c24c5697c1675bd","unresolved":false,"context_lines":[{"line_number":24,"context_line":"from pylev import damerau_levenshtein as dld"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"from oslo_config import cfg"},{"line_number":27,"context_line":"from oslo_config.generator import _get_groups"},{"line_number":28,"context_line":"from oslo_config.generator import _list_opts"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"LOG \u003d logging.getLogger(__name__)"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a6eadb0_98431142","line":28,"range":{"start_line":27,"start_character":0,"end_line":28,"end_character":44},"in_reply_to":"1a6eadb0_b60946e0","updated":"2016-12-14 21:34:24.000000000","message":"Understood.","commit_id":"2f0f5543c9fafa8d8c9fc718804221196697571f"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"eab3cd516b99558420a4b8f16469a7b630119ed4","unresolved":false,"context_lines":[{"line_number":126,"context_line":"            for possible_suggestion in valid_sect_set:"},{"line_number":127,"context_line":"                d \u003d dld(_orp, possible_suggestion)"},{"line_number":128,"context_line":"                if d \u003c\u003d TYPO_LIMIT:"},{"line_number":129,"context_line":"                    sect_suggestions[_orp].append(possible_suggestion)"},{"line_number":130,"context_line":"    return sect_suggestions"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"3a71b18c_ac5b45f5","line":129,"updated":"2016-12-12 23:45:48.000000000","message":"You can combine this line with 125.\nIt would look like\n\n sect_suggestions.setdefault(_orp, []).append(possible_suggestion)","commit_id":"2f0f5543c9fafa8d8c9fc718804221196697571f"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"3296ccbb5620572f14e420b21c24c5697c1675bd","unresolved":false,"context_lines":[{"line_number":126,"context_line":"            for possible_suggestion in valid_sect_set:"},{"line_number":127,"context_line":"                d \u003d dld(_orp, possible_suggestion)"},{"line_number":128,"context_line":"                if d \u003c\u003d TYPO_LIMIT:"},{"line_number":129,"context_line":"                    sect_suggestions[_orp].append(possible_suggestion)"},{"line_number":130,"context_line":"    return sect_suggestions"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"1a6eadb0_49c0dae0","line":129,"in_reply_to":"3a71b18c_ac5b45f5","updated":"2016-12-14 21:34:24.000000000","message":"That refactor breaks the \u0027unknown section\u0027 case, we need the empty list regardless of the dld.","commit_id":"2f0f5543c9fafa8d8c9fc718804221196697571f"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"eab3cd516b99558420a4b8f16469a7b630119ed4","unresolved":false,"context_lines":[{"line_number":148,"context_line":"    rehomings \u003d {}"},{"line_number":149,"context_line":"    leftover_orphans \u003d []"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    all_valid_values \u003d frozenset("},{"line_number":152,"context_line":"        list(chain.from_iterable(namespace_opts.values())))"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    for sect, vals in namespace_opts.items():"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a6eadb0_d23085a1","line":151,"updated":"2016-12-12 23:45:48.000000000","message":"Could you move `suggestions`, `rehoming` and `all_valid_values` closer to the place, where this variable is used @169?","commit_id":"2f0f5543c9fafa8d8c9fc718804221196697571f"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"3296ccbb5620572f14e420b21c24c5697c1675bd","unresolved":false,"context_lines":[{"line_number":148,"context_line":"    rehomings \u003d {}"},{"line_number":149,"context_line":"    leftover_orphans \u003d []"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    all_valid_values \u003d frozenset("},{"line_number":152,"context_line":"        list(chain.from_iterable(namespace_opts.values())))"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    for sect, vals in namespace_opts.items():"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a6eadb0_64585d33","line":151,"in_reply_to":"1a6eadb0_d23085a1","updated":"2016-12-14 21:34:24.000000000","message":"Done","commit_id":"2f0f5543c9fafa8d8c9fc718804221196697571f"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"eab3cd516b99558420a4b8f16469a7b630119ed4","unresolved":false,"context_lines":[{"line_number":151,"context_line":"    all_valid_values \u003d frozenset("},{"line_number":152,"context_line":"        list(chain.from_iterable(namespace_opts.values())))"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    for sect, vals in namespace_opts.items():"},{"line_number":155,"context_line":"        valid_value_set.update({sect: frozenset(list(chain(vals)))})"},{"line_number":156,"context_line":"    for sect, vals in input_config.items():"},{"line_number":157,"context_line":"        input_value_set.update({sect: frozenset(list(chain(vals)))})"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"    for sect, input_set in input_value_set.items():"},{"line_number":160,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a6eadb0_92b60d3c","line":157,"range":{"start_line":154,"start_character":0,"end_line":157,"end_character":68},"updated":"2016-12-12 23:45:48.000000000","message":"Both can be written as dict comprehensions:\n\n valid_value_set \u003d {section: frozenset(list(chain(values))) \n  for section, values in namespace_opts.items()}","commit_id":"2f0f5543c9fafa8d8c9fc718804221196697571f"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"3296ccbb5620572f14e420b21c24c5697c1675bd","unresolved":false,"context_lines":[{"line_number":151,"context_line":"    all_valid_values \u003d frozenset("},{"line_number":152,"context_line":"        list(chain.from_iterable(namespace_opts.values())))"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    for sect, vals in namespace_opts.items():"},{"line_number":155,"context_line":"        valid_value_set.update({sect: frozenset(list(chain(vals)))})"},{"line_number":156,"context_line":"    for sect, vals in input_config.items():"},{"line_number":157,"context_line":"        input_value_set.update({sect: frozenset(list(chain(vals)))})"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"    for sect, input_set in input_value_set.items():"},{"line_number":160,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a6eadb0_a442753c","line":157,"range":{"start_line":154,"start_character":0,"end_line":157,"end_character":68},"in_reply_to":"1a6eadb0_92b60d3c","updated":"2016-12-14 21:34:24.000000000","message":"Done","commit_id":"2f0f5543c9fafa8d8c9fc718804221196697571f"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"eab3cd516b99558420a4b8f16469a7b630119ed4","unresolved":false,"context_lines":[{"line_number":158,"context_line":""},{"line_number":159,"context_line":"    for sect, input_set in input_value_set.items():"},{"line_number":160,"context_line":"        try:"},{"line_number":161,"context_line":"            diff \u003d input_value_set[sect] - valid_value_set[sect]"},{"line_number":162,"context_line":"            if diff:"},{"line_number":163,"context_line":"                non_default_orphans \u003d diff - input_value_set[\u0027DEFAULT\u0027]"},{"line_number":164,"context_line":"                orphaned_input_values.update({sect: non_default_orphans})"},{"line_number":165,"context_line":"        except KeyError:"},{"line_number":166,"context_line":"            # section orphan, values can\u0027t be compared"},{"line_number":167,"context_line":"            pass"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a6eadb0_12467d23","line":164,"range":{"start_line":161,"start_character":0,"end_line":164,"end_character":73},"updated":"2016-12-12 23:45:48.000000000","message":"Which part should be wrapped with try/except?\nAre you trying to catch exception, when executing input_value_set[sect]?\nCould you wrap just the most important part?\n\nProbably you could use `try/except/else` to write it.","commit_id":"2f0f5543c9fafa8d8c9fc718804221196697571f"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"3296ccbb5620572f14e420b21c24c5697c1675bd","unresolved":false,"context_lines":[{"line_number":158,"context_line":""},{"line_number":159,"context_line":"    for sect, input_set in input_value_set.items():"},{"line_number":160,"context_line":"        try:"},{"line_number":161,"context_line":"            diff \u003d input_value_set[sect] - valid_value_set[sect]"},{"line_number":162,"context_line":"            if diff:"},{"line_number":163,"context_line":"                non_default_orphans \u003d diff - input_value_set[\u0027DEFAULT\u0027]"},{"line_number":164,"context_line":"                orphaned_input_values.update({sect: non_default_orphans})"},{"line_number":165,"context_line":"        except KeyError:"},{"line_number":166,"context_line":"            # section orphan, values can\u0027t be compared"},{"line_number":167,"context_line":"            pass"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a6eadb0_649a1d65","line":164,"range":{"start_line":161,"start_character":0,"end_line":164,"end_character":73},"in_reply_to":"1a6eadb0_12467d23","updated":"2016-12-14 21:34:24.000000000","message":"Done","commit_id":"2f0f5543c9fafa8d8c9fc718804221196697571f"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"dd85ad3bc8c13ddd9ee47ca13cf886b7dbd4ea82","unresolved":false,"context_lines":[{"line_number":167,"context_line":"            pass"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    for sect, orphans in orphaned_input_values.items():"},{"line_number":170,"context_line":"        if sect in [\u0027keystone_authtoken\u0027]:"},{"line_number":171,"context_line":"            continue"},{"line_number":172,"context_line":"        for _orp in orphans:"},{"line_number":173,"context_line":"            s_o \u003d (sect, _orp)"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a6eadb0_7de9191a","line":170,"range":{"start_line":170,"start_character":20,"end_line":170,"end_character":40},"updated":"2016-12-13 13:48:21.000000000","message":"We need to find a way to make this list configurable because projects can have multiple sections that have keystoneaut1 options, not only keystone_authtoken.\n\nFor example [neutron] in nova.conf or [service_credentials] in ceilometer.conf and aodh.conf.","commit_id":"2f0f5543c9fafa8d8c9fc718804221196697571f"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"3296ccbb5620572f14e420b21c24c5697c1675bd","unresolved":false,"context_lines":[{"line_number":167,"context_line":"            pass"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    for sect, orphans in orphaned_input_values.items():"},{"line_number":170,"context_line":"        if sect in [\u0027keystone_authtoken\u0027]:"},{"line_number":171,"context_line":"            continue"},{"line_number":172,"context_line":"        for _orp in orphans:"},{"line_number":173,"context_line":"            s_o \u003d (sect, _orp)"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a6eadb0_7f8704d7","line":170,"range":{"start_line":170,"start_character":20,"end_line":170,"end_character":40},"in_reply_to":"1a6eadb0_7de9191a","updated":"2016-12-14 21:34:24.000000000","message":"Something like --ignore-namespace option?","commit_id":"2f0f5543c9fafa8d8c9fc718804221196697571f"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"554c589e159d73c59e5f74de6c96a85ec928e512","unresolved":false,"context_lines":[{"line_number":167,"context_line":"            pass"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    for sect, orphans in orphaned_input_values.items():"},{"line_number":170,"context_line":"        if sect in [\u0027keystone_authtoken\u0027]:"},{"line_number":171,"context_line":"            continue"},{"line_number":172,"context_line":"        for _orp in orphans:"},{"line_number":173,"context_line":"            s_o \u003d (sect, _orp)"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a6eadb0_ae43c6ad","line":170,"range":{"start_line":170,"start_character":20,"end_line":170,"end_character":40},"in_reply_to":"1a6eadb0_7f8704d7","updated":"2016-12-16 17:20:24.000000000","message":"yes why not","commit_id":"2f0f5543c9fafa8d8c9fc718804221196697571f"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"eab3cd516b99558420a4b8f16469a7b630119ed4","unresolved":false,"context_lines":[{"line_number":171,"context_line":"            continue"},{"line_number":172,"context_line":"        for _orp in orphans:"},{"line_number":173,"context_line":"            s_o \u003d (sect, _orp)"},{"line_number":174,"context_line":"            suggestions.update({s_o: []})"},{"line_number":175,"context_line":"            rehomings.update({s_o: []})"},{"line_number":176,"context_line":"            for possible_suggestion in all_valid_values:"},{"line_number":177,"context_line":"                dld_dist \u003d dld(_orp, possible_suggestion)"},{"line_number":178,"context_line":"                if dld_dist \u003d\u003d 0:"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a6eadb0_41966195","line":175,"range":{"start_line":174,"start_character":0,"end_line":175,"end_character":39},"updated":"2016-12-12 23:45:48.000000000","message":"You could remove these two lines and @183-184 with @190-191 if you\u0027d use setdefault in @180 and @182 like:\n\n rehomings.setdefault(s_o, []).append(possible_suggestion)\n suggestions.setdefault(s_o, []).append(possible_suggestion)\n\nIt could be similar to this [1]\n\n[1] http://paste.openstack.org/show/592142/","commit_id":"2f0f5543c9fafa8d8c9fc718804221196697571f"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"3296ccbb5620572f14e420b21c24c5697c1675bd","unresolved":false,"context_lines":[{"line_number":171,"context_line":"            continue"},{"line_number":172,"context_line":"        for _orp in orphans:"},{"line_number":173,"context_line":"            s_o \u003d (sect, _orp)"},{"line_number":174,"context_line":"            suggestions.update({s_o: []})"},{"line_number":175,"context_line":"            rehomings.update({s_o: []})"},{"line_number":176,"context_line":"            for possible_suggestion in all_valid_values:"},{"line_number":177,"context_line":"                dld_dist \u003d dld(_orp, possible_suggestion)"},{"line_number":178,"context_line":"                if dld_dist \u003d\u003d 0:"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a6eadb0_1f00d000","line":175,"range":{"start_line":174,"start_character":0,"end_line":175,"end_character":39},"in_reply_to":"1a6eadb0_41966195","updated":"2016-12-14 21:34:24.000000000","message":"We need the empty rehomings/suggestions lists for these sections to cover the \u0027mispelled section\u0027 and \u0027mispelled option\u0027 cases before branching, making the setdefault redundant, but otherwise, Done.","commit_id":"2f0f5543c9fafa8d8c9fc718804221196697571f"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"eab3cd516b99558420a4b8f16469a7b630119ed4","unresolved":false,"context_lines":[{"line_number":185,"context_line":"            else:"},{"line_number":186,"context_line":"                rehomings[s_o] \u003d [_ for _ in namespace_opts.keys()"},{"line_number":187,"context_line":"                                  if _orp in namespace_opts[_]]"},{"line_number":188,"context_line":"                if \u0027keystone_authtoken\u0027 in rehomings[s_o]:"},{"line_number":189,"context_line":"                    rehomings[s_o].remove(\u0027keystone_authtoken\u0027)"},{"line_number":190,"context_line":"            if not suggestions[s_o]:"},{"line_number":191,"context_line":"                del suggestions[s_o]"},{"line_number":192,"context_line":"            if s_o not in suggestions.keys() and s_o not in rehomings.keys():"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a6eadb0_01a54903","line":189,"range":{"start_line":188,"start_character":0,"end_line":189,"end_character":63},"updated":"2016-12-12 23:45:48.000000000","message":"This line seems to be unnecessary because you\u0027re skipping section @170 if there is \u0027keystone_authtoken\u0027","commit_id":"2f0f5543c9fafa8d8c9fc718804221196697571f"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"3296ccbb5620572f14e420b21c24c5697c1675bd","unresolved":false,"context_lines":[{"line_number":185,"context_line":"            else:"},{"line_number":186,"context_line":"                rehomings[s_o] \u003d [_ for _ in namespace_opts.keys()"},{"line_number":187,"context_line":"                                  if _orp in namespace_opts[_]]"},{"line_number":188,"context_line":"                if \u0027keystone_authtoken\u0027 in rehomings[s_o]:"},{"line_number":189,"context_line":"                    rehomings[s_o].remove(\u0027keystone_authtoken\u0027)"},{"line_number":190,"context_line":"            if not suggestions[s_o]:"},{"line_number":191,"context_line":"                del suggestions[s_o]"},{"line_number":192,"context_line":"            if s_o not in suggestions.keys() and s_o not in rehomings.keys():"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a6eadb0_ff4a34ab","line":189,"range":{"start_line":188,"start_character":0,"end_line":189,"end_character":63},"in_reply_to":"1a6eadb0_01a54903","updated":"2016-12-14 21:34:24.000000000","message":"We still need to purge the ignored sections from the rehoming dict. This does need to be configurable, as Mehdi mentioned on @170.","commit_id":"2f0f5543c9fafa8d8c9fc718804221196697571f"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"eab3cd516b99558420a4b8f16469a7b630119ed4","unresolved":false,"context_lines":[{"line_number":204,"context_line":"        return False"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"def _validate(input_file, namespace_config):"},{"line_number":208,"context_line":"    \"\"\"Validate the configuration file against namespace options."},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"    :param input_file: path to configuration file"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a6eadb0_74e4f40c","line":207,"updated":"2016-12-12 23:45:48.000000000","message":"_validate function has a lot of if/else clauses. Would it be possible to create couple smaller functions, then reuse them? It\u0027s very hard to follow workflow of this function.","commit_id":"2f0f5543c9fafa8d8c9fc718804221196697571f"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"3296ccbb5620572f14e420b21c24c5697c1675bd","unresolved":false,"context_lines":[{"line_number":204,"context_line":"        return False"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"def _validate(input_file, namespace_config):"},{"line_number":208,"context_line":"    \"\"\"Validate the configuration file against namespace options."},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"    :param input_file: path to configuration file"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a6eadb0_f82fa585","line":207,"in_reply_to":"1a6eadb0_74e4f40c","updated":"2016-12-14 21:34:24.000000000","message":"I\u0027ve refactored out as much as possible without cramming everything into an object, but I can still do that too.","commit_id":"2f0f5543c9fafa8d8c9fc718804221196697571f"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"eab3cd516b99558420a4b8f16469a7b630119ed4","unresolved":false,"context_lines":[{"line_number":233,"context_line":"    sect_suggestions \u003d _check_section_suggestions(namespace_opts, input_config)"},{"line_number":234,"context_line":"    if sect_suggestions:"},{"line_number":235,"context_line":"        config_is_valid \u003d False"},{"line_number":236,"context_line":"        for _orp, sugg in sect_suggestions.items():"},{"line_number":237,"context_line":"            if sugg:"},{"line_number":238,"context_line":"                results[\u0027config_errors\u0027].append("},{"line_number":239,"context_line":"                    _result_message(_sect_misspelled, _orp, \u0027\u0027, sugg))"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a6eadb0_94bef0fd","line":236,"range":{"start_line":236,"start_character":12,"end_line":236,"end_character":16},"updated":"2016-12-12 23:45:48.000000000","message":"What does `_orp` mean? Orphaned? Could you use full varnames? It would help anyone who will look at this code in some time.","commit_id":"2f0f5543c9fafa8d8c9fc718804221196697571f"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"3296ccbb5620572f14e420b21c24c5697c1675bd","unresolved":false,"context_lines":[{"line_number":233,"context_line":"    sect_suggestions \u003d _check_section_suggestions(namespace_opts, input_config)"},{"line_number":234,"context_line":"    if sect_suggestions:"},{"line_number":235,"context_line":"        config_is_valid \u003d False"},{"line_number":236,"context_line":"        for _orp, sugg in sect_suggestions.items():"},{"line_number":237,"context_line":"            if sugg:"},{"line_number":238,"context_line":"                results[\u0027config_errors\u0027].append("},{"line_number":239,"context_line":"                    _result_message(_sect_misspelled, _orp, \u0027\u0027, sugg))"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a6eadb0_e3a54247","line":236,"range":{"start_line":236,"start_character":12,"end_line":236,"end_character":16},"in_reply_to":"1a6eadb0_94bef0fd","updated":"2016-12-14 21:34:24.000000000","message":"Done","commit_id":"2f0f5543c9fafa8d8c9fc718804221196697571f"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"eab3cd516b99558420a4b8f16469a7b630119ed4","unresolved":false,"context_lines":[{"line_number":343,"context_line":""},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"def _result_message(message, valid_section, valid_name, validate_opt\u003dNone):"},{"line_number":346,"context_line":"    \"\"\"Return and append the results message."},{"line_number":347,"context_line":""},{"line_number":348,"context_line":"    :param message: function object to retrieve message information from"},{"line_number":349,"context_line":"    :param valid_section: namespace section name"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a6eadb0_d404e8c7","line":346,"range":{"start_line":346,"start_character":18,"end_line":346,"end_character":24},"updated":"2016-12-12 23:45:48.000000000","message":"You are not appending message to anything.","commit_id":"2f0f5543c9fafa8d8c9fc718804221196697571f"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"3296ccbb5620572f14e420b21c24c5697c1675bd","unresolved":false,"context_lines":[{"line_number":343,"context_line":""},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"def _result_message(message, valid_section, valid_name, validate_opt\u003dNone):"},{"line_number":346,"context_line":"    \"\"\"Return and append the results message."},{"line_number":347,"context_line":""},{"line_number":348,"context_line":"    :param message: function object to retrieve message information from"},{"line_number":349,"context_line":"    :param valid_section: namespace section name"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a6eadb0_236adaee","line":346,"range":{"start_line":346,"start_character":18,"end_line":346,"end_character":24},"in_reply_to":"1a6eadb0_d404e8c7","updated":"2016-12-14 21:34:24.000000000","message":"Done","commit_id":"2f0f5543c9fafa8d8c9fc718804221196697571f"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"eab3cd516b99558420a4b8f16469a7b630119ed4","unresolved":false,"context_lines":[{"line_number":431,"context_line":"    config_is_valid \u003d results[0]"},{"line_number":432,"context_line":"    warns \u003d results[1][\u0027config_warnings\u0027]"},{"line_number":433,"context_line":"    errs \u003d results[1][\u0027config_errors\u0027]"},{"line_number":434,"context_line":"    report \u003d \u0027Config file is valid: {}\u0027.format(config_is_valid)"},{"line_number":435,"context_line":"    for e in errs:"},{"line_number":436,"context_line":"        report +\u003d \u0027\\n\\tERROR: {}\u0027.format(e[\u0027message\u0027])"},{"line_number":437,"context_line":"    for w in warns:"},{"line_number":438,"context_line":"        report +\u003d \u0027\\n\\tWARNING: {}\u0027.format(w[\u0027message\u0027])"},{"line_number":439,"context_line":"    print(report)"},{"line_number":440,"context_line":""},{"line_number":441,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"1a6eadb0_1482e000","line":438,"range":{"start_line":434,"start_character":0,"end_line":438,"end_character":56},"updated":"2016-12-12 23:45:48.000000000","message":"You can create a list, then append all messages to list, and at the end create a string from it. Then you won\u0027t need to format it when iterating over string.\n\n report \u003d []\n report.append(\u0027Config file is valid: {}\u0027.format(config_is_valid))\n report.extend([\u0027ERROR: {}\u0027.format(e[\u0027message\u0027]) for e in errs])\n report.extend([\u0027WARNING: {}\u0027.format(w[\u0027message\u0027]) for w in warns])\n print(\u0027\\n\\t\u0027.join(report))","commit_id":"2f0f5543c9fafa8d8c9fc718804221196697571f"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"3296ccbb5620572f14e420b21c24c5697c1675bd","unresolved":false,"context_lines":[{"line_number":431,"context_line":"    config_is_valid \u003d results[0]"},{"line_number":432,"context_line":"    warns \u003d results[1][\u0027config_warnings\u0027]"},{"line_number":433,"context_line":"    errs \u003d results[1][\u0027config_errors\u0027]"},{"line_number":434,"context_line":"    report \u003d \u0027Config file is valid: {}\u0027.format(config_is_valid)"},{"line_number":435,"context_line":"    for e in errs:"},{"line_number":436,"context_line":"        report +\u003d \u0027\\n\\tERROR: {}\u0027.format(e[\u0027message\u0027])"},{"line_number":437,"context_line":"    for w in warns:"},{"line_number":438,"context_line":"        report +\u003d \u0027\\n\\tWARNING: {}\u0027.format(w[\u0027message\u0027])"},{"line_number":439,"context_line":"    print(report)"},{"line_number":440,"context_line":""},{"line_number":441,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"1a6eadb0_fd531737","line":438,"range":{"start_line":434,"start_character":0,"end_line":438,"end_character":56},"in_reply_to":"1a6eadb0_1482e000","updated":"2016-12-14 21:34:24.000000000","message":"Done","commit_id":"2f0f5543c9fafa8d8c9fc718804221196697571f"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"3bd4203dbe354df3264c7f219411150c8ca0d9d6","unresolved":false,"context_lines":[{"line_number":158,"context_line":"        else:"},{"line_number":159,"context_line":"            non_default_orphans \u003d diff - input_value_set[\u0027DEFAULT\u0027]"},{"line_number":160,"context_line":"            orphaned_input_values.update({section: non_default_orphans})"},{"line_number":161,"context_line":"            # section orphan, values can\u0027t be compared"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    suggestions \u003d {}"},{"line_number":164,"context_line":"    rehomings \u003d {}"}],"source_content_type":"text/x-python","patch_set":34,"id":"1a6eadb0_a7187776","line":161,"updated":"2016-12-15 21:59:20.000000000","message":"Should be on line 157","commit_id":"eda5c0190b4da4c29d64a034682d1523fef7d619"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"786143bfbbb2f1f664f8516291d82b029c9e2957","unresolved":false,"context_lines":[{"line_number":104,"context_line":"    :param config_section: valid section in namespace"},{"line_number":105,"context_line":"    :param item_name: valid option name"},{"line_number":106,"context_line":"    :param mess: warning or error message"},{"line_number":107,"context_line":"    :returns dict of warning or error"},{"line_number":108,"context_line":"    \"\"\""},{"line_number":109,"context_line":"    return {\u0027type\u0027: _type, \u0027config_item\u0027: config_item,"},{"line_number":110,"context_line":"            \u0027config_section\u0027: config_section, \u0027item_name\u0027: item_name,"}],"source_content_type":"text/x-python","patch_set":40,"id":"7a3c09a3_ca6019d2","line":107,"updated":"2017-01-17 17:12:43.000000000","message":"missing colon","commit_id":"cb2687937e79b9d2ac72e9332847dfb299dc6ac4"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"f6bb400d72fc928d2b5150fde9ee00647fa20509","unresolved":false,"context_lines":[{"line_number":104,"context_line":"    :param config_section: valid section in namespace"},{"line_number":105,"context_line":"    :param item_name: valid option name"},{"line_number":106,"context_line":"    :param mess: warning or error message"},{"line_number":107,"context_line":"    :returns dict of warning or error"},{"line_number":108,"context_line":"    \"\"\""},{"line_number":109,"context_line":"    return {\u0027type\u0027: _type, \u0027config_item\u0027: config_item,"},{"line_number":110,"context_line":"            \u0027config_section\u0027: config_section, \u0027item_name\u0027: item_name,"}],"source_content_type":"text/x-python","patch_set":40,"id":"7a3c09a3_ed75ec97","line":107,"in_reply_to":"7a3c09a3_ca6019d2","updated":"2017-01-17 18:06:08.000000000","message":"Done","commit_id":"cb2687937e79b9d2ac72e9332847dfb299dc6ac4"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"786143bfbbb2f1f664f8516291d82b029c9e2957","unresolved":false,"context_lines":[{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    :param namespace_opts: parsed namespace sections and options"},{"line_number":121,"context_line":"    :param input_config: parsed configuration file"},{"line_number":122,"context_line":"    :returns array of section suggestions"},{"line_number":123,"context_line":"    \"\"\""},{"line_number":124,"context_line":"    valid_set \u003d frozenset(list(itertools.chain(namespace_opts.keys())))"},{"line_number":125,"context_line":"    input_set \u003d frozenset(list(itertools.chain(input_config.keys())))"}],"source_content_type":"text/x-python","patch_set":40,"id":"7a3c09a3_ea5dd515","line":122,"updated":"2017-01-17 17:12:43.000000000","message":"ditto","commit_id":"cb2687937e79b9d2ac72e9332847dfb299dc6ac4"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"f6bb400d72fc928d2b5150fde9ee00647fa20509","unresolved":false,"context_lines":[{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    :param namespace_opts: parsed namespace sections and options"},{"line_number":121,"context_line":"    :param input_config: parsed configuration file"},{"line_number":122,"context_line":"    :returns array of section suggestions"},{"line_number":123,"context_line":"    \"\"\""},{"line_number":124,"context_line":"    valid_set \u003d frozenset(list(itertools.chain(namespace_opts.keys())))"},{"line_number":125,"context_line":"    input_set \u003d frozenset(list(itertools.chain(input_config.keys())))"}],"source_content_type":"text/x-python","patch_set":40,"id":"7a3c09a3_ed2c0c04","line":122,"in_reply_to":"7a3c09a3_ea5dd515","updated":"2017-01-17 18:06:08.000000000","message":"Done","commit_id":"cb2687937e79b9d2ac72e9332847dfb299dc6ac4"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"786143bfbbb2f1f664f8516291d82b029c9e2957","unresolved":false,"context_lines":[{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    :param namespace_opts: parsed namespace sections and options"},{"line_number":150,"context_line":"    :param input_config: parsed configuration file"},{"line_number":151,"context_line":"    :returns array of suggestions, array of options misplaced, array of"},{"line_number":152,"context_line":"    leftover options not known in namespace"},{"line_number":153,"context_line":"    \"\"\""},{"line_number":154,"context_line":"    orphaned_input_values \u003d {}"}],"source_content_type":"text/x-python","patch_set":40,"id":"7a3c09a3_0a9dc1bb","line":151,"updated":"2017-01-17 17:12:43.000000000","message":"ditto","commit_id":"cb2687937e79b9d2ac72e9332847dfb299dc6ac4"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"f6bb400d72fc928d2b5150fde9ee00647fa20509","unresolved":false,"context_lines":[{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    :param namespace_opts: parsed namespace sections and options"},{"line_number":150,"context_line":"    :param input_config: parsed configuration file"},{"line_number":151,"context_line":"    :returns array of suggestions, array of options misplaced, array of"},{"line_number":152,"context_line":"    leftover options not known in namespace"},{"line_number":153,"context_line":"    \"\"\""},{"line_number":154,"context_line":"    orphaned_input_values \u003d {}"}],"source_content_type":"text/x-python","patch_set":40,"id":"7a3c09a3_2d6c54cf","line":151,"in_reply_to":"7a3c09a3_0a9dc1bb","updated":"2017-01-17 18:06:08.000000000","message":"Done","commit_id":"cb2687937e79b9d2ac72e9332847dfb299dc6ac4"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"786143bfbbb2f1f664f8516291d82b029c9e2957","unresolved":false,"context_lines":[{"line_number":215,"context_line":""},{"line_number":216,"context_line":"    :param option: user-supplied option"},{"line_number":217,"context_line":"    :param valid_option: option to validate against"},{"line_number":218,"context_line":"    :returns True if parseable, False if ValueError or AttributeError"},{"line_number":219,"context_line":"    \"\"\""},{"line_number":220,"context_line":"    try:"},{"line_number":221,"context_line":"        valid_option.type.__call__(option)"}],"source_content_type":"text/x-python","patch_set":40,"id":"7a3c09a3_2aa27dfd","line":218,"updated":"2017-01-17 17:12:43.000000000","message":"ditto","commit_id":"cb2687937e79b9d2ac72e9332847dfb299dc6ac4"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"f6bb400d72fc928d2b5150fde9ee00647fa20509","unresolved":false,"context_lines":[{"line_number":215,"context_line":""},{"line_number":216,"context_line":"    :param option: user-supplied option"},{"line_number":217,"context_line":"    :param valid_option: option to validate against"},{"line_number":218,"context_line":"    :returns True if parseable, False if ValueError or AttributeError"},{"line_number":219,"context_line":"    \"\"\""},{"line_number":220,"context_line":"    try:"},{"line_number":221,"context_line":"        valid_option.type.__call__(option)"}],"source_content_type":"text/x-python","patch_set":40,"id":"7a3c09a3_6d6adcb4","line":218,"in_reply_to":"7a3c09a3_2aa27dfd","updated":"2017-01-17 18:06:08.000000000","message":"Done","commit_id":"cb2687937e79b9d2ac72e9332847dfb299dc6ac4"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"786143bfbbb2f1f664f8516291d82b029c9e2957","unresolved":false,"context_lines":[{"line_number":230,"context_line":""},{"line_number":231,"context_line":"    :param section_suggestions: dict of section orphans and suggestions"},{"line_number":232,"context_line":"    :param results: list of all results"},{"line_number":233,"context_line":"    :returns results appened with new errors"},{"line_number":234,"context_line":"    \"\"\""},{"line_number":235,"context_line":"    for orphan, suggestion in section_suggestions.items():"},{"line_number":236,"context_line":"        if suggestion:"}],"source_content_type":"text/x-python","patch_set":40,"id":"7a3c09a3_6aa805dc","line":233,"updated":"2017-01-17 17:12:43.000000000","message":"ditto","commit_id":"cb2687937e79b9d2ac72e9332847dfb299dc6ac4"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"f6bb400d72fc928d2b5150fde9ee00647fa20509","unresolved":false,"context_lines":[{"line_number":230,"context_line":""},{"line_number":231,"context_line":"    :param section_suggestions: dict of section orphans and suggestions"},{"line_number":232,"context_line":"    :param results: list of all results"},{"line_number":233,"context_line":"    :returns results appened with new errors"},{"line_number":234,"context_line":"    \"\"\""},{"line_number":235,"context_line":"    for orphan, suggestion in section_suggestions.items():"},{"line_number":236,"context_line":"        if suggestion:"}],"source_content_type":"text/x-python","patch_set":40,"id":"7a3c09a3_ad6044d0","line":233,"in_reply_to":"7a3c09a3_6aa805dc","updated":"2017-01-17 18:06:08.000000000","message":"Done","commit_id":"cb2687937e79b9d2ac72e9332847dfb299dc6ac4"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"786143bfbbb2f1f664f8516291d82b029c9e2957","unresolved":false,"context_lines":[{"line_number":249,"context_line":"    :param option_suggestions: suggestions dict keyed on (sect, opt) tuples"},{"line_number":250,"context_line":"    :param option_rehomings: dict of options that can be rehomed"},{"line_number":251,"context_line":"    :param results: list of all results"},{"line_number":252,"context_line":"    :returns results appened with new errors"},{"line_number":253,"context_line":"    \"\"\""},{"line_number":254,"context_line":"    for section_option, suggestion in option_suggestions.items():"},{"line_number":255,"context_line":"        if section_option not in option_rehomings:"}],"source_content_type":"text/x-python","patch_set":40,"id":"7a3c09a3_eab4f535","line":252,"updated":"2017-01-17 17:12:43.000000000","message":"ditto","commit_id":"cb2687937e79b9d2ac72e9332847dfb299dc6ac4"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"f6bb400d72fc928d2b5150fde9ee00647fa20509","unresolved":false,"context_lines":[{"line_number":249,"context_line":"    :param option_suggestions: suggestions dict keyed on (sect, opt) tuples"},{"line_number":250,"context_line":"    :param option_rehomings: dict of options that can be rehomed"},{"line_number":251,"context_line":"    :param results: list of all results"},{"line_number":252,"context_line":"    :returns results appened with new errors"},{"line_number":253,"context_line":"    \"\"\""},{"line_number":254,"context_line":"    for section_option, suggestion in option_suggestions.items():"},{"line_number":255,"context_line":"        if section_option not in option_rehomings:"}],"source_content_type":"text/x-python","patch_set":40,"id":"7a3c09a3_ad4764ba","line":252,"in_reply_to":"7a3c09a3_eab4f535","updated":"2017-01-17 18:06:08.000000000","message":"Done","commit_id":"cb2687937e79b9d2ac72e9332847dfb299dc6ac4"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"786143bfbbb2f1f664f8516291d82b029c9e2957","unresolved":false,"context_lines":[{"line_number":265,"context_line":"    :param option_leftover_orphans: dict of options that have no rehoming or"},{"line_number":266,"context_line":"            spelling suggestions"},{"line_number":267,"context_line":"    :param results: list of all results"},{"line_number":268,"context_line":"    :returns results appened with new errors"},{"line_number":269,"context_line":"    \"\"\""},{"line_number":270,"context_line":"    for section_option in option_leftover_orphans:"},{"line_number":271,"context_line":"        section, option \u003d section_option[0], section_option[1]"}],"source_content_type":"text/x-python","patch_set":40,"id":"7a3c09a3_4af18900","line":268,"range":{"start_line":268,"start_character":21,"end_line":268,"end_character":28},"updated":"2017-01-17 17:12:43.000000000","message":"missing colon after `returns` keyword\ntypo: appended","commit_id":"cb2687937e79b9d2ac72e9332847dfb299dc6ac4"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"f6bb400d72fc928d2b5150fde9ee00647fa20509","unresolved":false,"context_lines":[{"line_number":265,"context_line":"    :param option_leftover_orphans: dict of options that have no rehoming or"},{"line_number":266,"context_line":"            spelling suggestions"},{"line_number":267,"context_line":"    :param results: list of all results"},{"line_number":268,"context_line":"    :returns results appened with new errors"},{"line_number":269,"context_line":"    \"\"\""},{"line_number":270,"context_line":"    for section_option in option_leftover_orphans:"},{"line_number":271,"context_line":"        section, option \u003d section_option[0], section_option[1]"}],"source_content_type":"text/x-python","patch_set":40,"id":"7a3c09a3_ed9c0cc2","line":268,"range":{"start_line":268,"start_character":21,"end_line":268,"end_character":28},"in_reply_to":"7a3c09a3_4af18900","updated":"2017-01-17 18:06:08.000000000","message":"Done","commit_id":"cb2687937e79b9d2ac72e9332847dfb299dc6ac4"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"786143bfbbb2f1f664f8516291d82b029c9e2957","unresolved":false,"context_lines":[{"line_number":285,"context_line":"    :param valid_section: valid section name"},{"line_number":286,"context_line":"    :param validate_opt: the option to validate"},{"line_number":287,"context_line":"    :param results: list of all results"},{"line_number":288,"context_line":"    :returns results appended with new warnings"},{"line_number":289,"context_line":"    \"\"\""},{"line_number":290,"context_line":"    if valid_option.advanced:"},{"line_number":291,"context_line":"        results[\u0027config_warnings\u0027].append(_result_message("}],"source_content_type":"text/x-python","patch_set":40,"id":"7a3c09a3_2a651db4","line":288,"updated":"2017-01-17 17:12:43.000000000","message":"missing colon","commit_id":"cb2687937e79b9d2ac72e9332847dfb299dc6ac4"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"f6bb400d72fc928d2b5150fde9ee00647fa20509","unresolved":false,"context_lines":[{"line_number":285,"context_line":"    :param valid_section: valid section name"},{"line_number":286,"context_line":"    :param validate_opt: the option to validate"},{"line_number":287,"context_line":"    :param results: list of all results"},{"line_number":288,"context_line":"    :returns results appended with new warnings"},{"line_number":289,"context_line":"    \"\"\""},{"line_number":290,"context_line":"    if valid_option.advanced:"},{"line_number":291,"context_line":"        results[\u0027config_warnings\u0027].append(_result_message("}],"source_content_type":"text/x-python","patch_set":40,"id":"7a3c09a3_4df600fa","line":288,"in_reply_to":"7a3c09a3_2a651db4","updated":"2017-01-17 18:06:08.000000000","message":"Done","commit_id":"cb2687937e79b9d2ac72e9332847dfb299dc6ac4"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"786143bfbbb2f1f664f8516291d82b029c9e2957","unresolved":false,"context_lines":[{"line_number":304,"context_line":""},{"line_number":305,"context_line":"    :param input_file: path to configuration file"},{"line_number":306,"context_line":"    :param namespace_config: namespace options"},{"line_number":307,"context_line":"    :returns config_is_valid, results dict of error and warning messages"},{"line_number":308,"context_line":"    \"\"\""},{"line_number":309,"context_line":"    input_config \u003d _parse_config_file(input_file)"},{"line_number":310,"context_line":"    groups \u003d _get_groups(namespace_config)"}],"source_content_type":"text/x-python","patch_set":40,"id":"7a3c09a3_e4bfcca7","line":307,"range":{"start_line":307,"start_character":28,"end_line":307,"end_character":29},"updated":"2017-01-17 17:12:43.000000000","message":"typo: this should be colon","commit_id":"cb2687937e79b9d2ac72e9332847dfb299dc6ac4"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"f6bb400d72fc928d2b5150fde9ee00647fa20509","unresolved":false,"context_lines":[{"line_number":304,"context_line":""},{"line_number":305,"context_line":"    :param input_file: path to configuration file"},{"line_number":306,"context_line":"    :param namespace_config: namespace options"},{"line_number":307,"context_line":"    :returns config_is_valid, results dict of error and warning messages"},{"line_number":308,"context_line":"    \"\"\""},{"line_number":309,"context_line":"    input_config \u003d _parse_config_file(input_file)"},{"line_number":310,"context_line":"    groups \u003d _get_groups(namespace_config)"}],"source_content_type":"text/x-python","patch_set":40,"id":"7a3c09a3_ed896c27","line":307,"range":{"start_line":307,"start_character":28,"end_line":307,"end_character":29},"in_reply_to":"7a3c09a3_e4bfcca7","updated":"2017-01-17 18:06:08.000000000","message":"It\u0027s returning two things, I think it belongs after \u0027:returns\u0027 in this one too.","commit_id":"cb2687937e79b9d2ac72e9332847dfb299dc6ac4"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"786143bfbbb2f1f664f8516291d82b029c9e2957","unresolved":false,"context_lines":[{"line_number":390,"context_line":""},{"line_number":391,"context_line":"    :param input_file: path to configuration file"},{"line_number":392,"context_line":"    :param namespace_config: namespace options"},{"line_number":393,"context_line":"    :returns config_is_valid, results dict from _validate"},{"line_number":394,"context_line":"    \"\"\""},{"line_number":395,"context_line":"    conf \u003d cfg.ConfigOpts()"},{"line_number":396,"context_line":"    conf.register_opts(_validator_opts)"}],"source_content_type":"text/x-python","patch_set":40,"id":"7a3c09a3_2ada7d4c","line":393,"updated":"2017-01-17 17:12:43.000000000","message":"missing colon","commit_id":"cb2687937e79b9d2ac72e9332847dfb299dc6ac4"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"f6bb400d72fc928d2b5150fde9ee00647fa20509","unresolved":false,"context_lines":[{"line_number":390,"context_line":""},{"line_number":391,"context_line":"    :param input_file: path to configuration file"},{"line_number":392,"context_line":"    :param namespace_config: namespace options"},{"line_number":393,"context_line":"    :returns config_is_valid, results dict from _validate"},{"line_number":394,"context_line":"    \"\"\""},{"line_number":395,"context_line":"    conf \u003d cfg.ConfigOpts()"},{"line_number":396,"context_line":"    conf.register_opts(_validator_opts)"}],"source_content_type":"text/x-python","patch_set":40,"id":"7a3c09a3_4d852005","line":393,"in_reply_to":"7a3c09a3_2ada7d4c","updated":"2017-01-17 18:06:08.000000000","message":"Done","commit_id":"cb2687937e79b9d2ac72e9332847dfb299dc6ac4"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"786143bfbbb2f1f664f8516291d82b029c9e2957","unresolved":false,"context_lines":[{"line_number":405,"context_line":"    :param valid_section: namespace section name"},{"line_number":406,"context_line":"    :param valid_name: namespace valid option name"},{"line_number":407,"context_line":"    :param validate_option: config file option"},{"line_number":408,"context_line":"    :returns dict containing the warning/error"},{"line_number":409,"context_line":"    \"\"\""},{"line_number":410,"context_line":"    result_type, result_item, message \u003d message()"},{"line_number":411,"context_line":"    m \u003d message.format(valid_section, valid_name, validate_option)"}],"source_content_type":"text/x-python","patch_set":40,"id":"7a3c09a3_eaecf5f4","line":408,"updated":"2017-01-17 17:12:43.000000000","message":"ditto","commit_id":"cb2687937e79b9d2ac72e9332847dfb299dc6ac4"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"f6bb400d72fc928d2b5150fde9ee00647fa20509","unresolved":false,"context_lines":[{"line_number":405,"context_line":"    :param valid_section: namespace section name"},{"line_number":406,"context_line":"    :param valid_name: namespace valid option name"},{"line_number":407,"context_line":"    :param validate_option: config file option"},{"line_number":408,"context_line":"    :returns dict containing the warning/error"},{"line_number":409,"context_line":"    \"\"\""},{"line_number":410,"context_line":"    result_type, result_item, message \u003d message()"},{"line_number":411,"context_line":"    m \u003d message.format(valid_section, valid_name, validate_option)"}],"source_content_type":"text/x-python","patch_set":40,"id":"7a3c09a3_ed908c45","line":408,"in_reply_to":"7a3c09a3_eaecf5f4","updated":"2017-01-17 18:06:08.000000000","message":"Done","commit_id":"cb2687937e79b9d2ac72e9332847dfb299dc6ac4"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"2c9c2521cdebb500f89e1f53c388d8e4316db65b","unresolved":false,"context_lines":[{"line_number":103,"context_line":"    :param config_item: config item type [\u0027option\u0027, \u0027section\u0027]"},{"line_number":104,"context_line":"    :param config_section: valid section in namespace"},{"line_number":105,"context_line":"    :param item_name: valid option name"},{"line_number":106,"context_line":"    :param mess: warning or error message"},{"line_number":107,"context_line":"    :returns: dict of warning or error"},{"line_number":108,"context_line":"    \"\"\""},{"line_number":109,"context_line":"    return {\u0027type\u0027: _type, \u0027config_item\u0027: config_item,"}],"source_content_type":"text/x-python","patch_set":41,"id":"5a3905b3_20a32751","line":106,"range":{"start_line":106,"start_character":11,"end_line":106,"end_character":15},"updated":"2017-01-24 23:02:31.000000000","message":"nit: s/mess/message","commit_id":"cee991db3de4aa4a088da4ba2ddbfb714ae65f47"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"b11bf7b2def2e77247d01159488b2b1fc32d33a4","unresolved":false,"context_lines":[{"line_number":112,"context_line":""},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"def _check_section_suggestions(namespace_opts, input_config,"},{"line_number":115,"context_line":"                               ignore_namespace\u003d[]):"},{"line_number":116,"context_line":"    \"\"\"Check section suggestions."},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    Check what sections are misspelled or unknown in passed namespace_opts."}],"source_content_type":"text/x-python","patch_set":41,"id":"5a3905b3_2f3c54c7","line":115,"range":{"start_line":115,"start_character":31,"end_line":115,"end_character":52},"updated":"2017-01-23 11:46:08.000000000","message":"useless parameter.","commit_id":"cee991db3de4aa4a088da4ba2ddbfb714ae65f47"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"2c9c2521cdebb500f89e1f53c388d8e4316db65b","unresolved":false,"context_lines":[{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    :param namespace_opts: parsed namespace sections and options"},{"line_number":150,"context_line":"    :param input_config: parsed configuration file"},{"line_number":151,"context_line":"    :returns: array of suggestions, array of options misplaced, array of"},{"line_number":152,"context_line":"    leftover options not known in namespace"},{"line_number":153,"context_line":"    \"\"\""},{"line_number":154,"context_line":"    orphaned_input_values \u003d {}"}],"source_content_type":"text/x-python","patch_set":41,"id":"5a3905b3_a07d57b3","line":151,"updated":"2017-01-24 23:02:31.000000000","message":"nit: :param ignore_namespace","commit_id":"cee991db3de4aa4a088da4ba2ddbfb714ae65f47"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"2c9c2521cdebb500f89e1f53c388d8e4316db65b","unresolved":false,"context_lines":[{"line_number":299,"context_line":"    return results"},{"line_number":300,"context_line":""},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"def _validate(input_file, namespace_config, ignore_namespace\u003d[]):"},{"line_number":303,"context_line":"    \"\"\"Validate the configuration file against namespace options."},{"line_number":304,"context_line":""},{"line_number":305,"context_line":"    :param input_file: path to configuration file"}],"source_content_type":"text/x-python","patch_set":41,"id":"5a3905b3_bbed89f1","line":302,"updated":"2017-01-24 23:02:31.000000000","message":"ditto: line 151","commit_id":"cee991db3de4aa4a088da4ba2ddbfb714ae65f47"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"2c9c2521cdebb500f89e1f53c388d8e4316db65b","unresolved":false,"context_lines":[{"line_number":385,"context_line":"    return config_is_valid, results"},{"line_number":386,"context_line":""},{"line_number":387,"context_line":""},{"line_number":388,"context_line":"def validate(input_file, namespace_config, ignore_namespace\u003d[]):"},{"line_number":389,"context_line":"    \"\"\"Validate the configuration file against namespace options."},{"line_number":390,"context_line":""},{"line_number":391,"context_line":"    :param input_file: path to configuration file"}],"source_content_type":"text/x-python","patch_set":41,"id":"5a3905b3_1baa1d86","line":388,"updated":"2017-01-24 23:02:31.000000000","message":"ditto: line 151","commit_id":"cee991db3de4aa4a088da4ba2ddbfb714ae65f47"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"8c136974cfb9e35c045e783ec9437f598dceb77c","unresolved":false,"context_lines":[{"line_number":39,"context_line":"    cfg.MultiStrOpt(\u0027ignore-namespace\u0027,"},{"line_number":40,"context_line":"                    required\u003dFalse,"},{"line_number":41,"context_line":"                    help\u003d\u0027Namespace and options will be validated but not \u0027"},{"line_number":42,"context_line":"                         \u0027considered for relocation\u0027),"},{"line_number":43,"context_line":"    cfg.StrOpt(\u0027input-file\u0027,"},{"line_number":44,"context_line":"               required\u003dTrue,"},{"line_number":45,"context_line":"               help\u003d\u0027Configuration file to validate\u0027)"}],"source_content_type":"text/x-python","patch_set":44,"id":"ba2be162_13781df2","line":42,"updated":"2017-03-01 15:32:57.000000000","message":"default to empty list?","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"44c615f33dda412d38e73e404a428169be023bfa","unresolved":false,"context_lines":[{"line_number":39,"context_line":"    cfg.MultiStrOpt(\u0027ignore-namespace\u0027,"},{"line_number":40,"context_line":"                    required\u003dFalse,"},{"line_number":41,"context_line":"                    help\u003d\u0027Namespace and options will be validated but not \u0027"},{"line_number":42,"context_line":"                         \u0027considered for relocation\u0027),"},{"line_number":43,"context_line":"    cfg.StrOpt(\u0027input-file\u0027,"},{"line_number":44,"context_line":"               required\u003dTrue,"},{"line_number":45,"context_line":"               help\u003d\u0027Configuration file to validate\u0027)"}],"source_content_type":"text/x-python","patch_set":44,"id":"ba2be162_e63017eb","line":42,"in_reply_to":"ba2be162_13781df2","updated":"2017-03-07 16:55:49.000000000","message":"Done","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"8c136974cfb9e35c045e783ec9437f598dceb77c","unresolved":false,"context_lines":[{"line_number":42,"context_line":"                         \u0027considered for relocation\u0027),"},{"line_number":43,"context_line":"    cfg.StrOpt(\u0027input-file\u0027,"},{"line_number":44,"context_line":"               required\u003dTrue,"},{"line_number":45,"context_line":"               help\u003d\u0027Configuration file to validate\u0027)"},{"line_number":46,"context_line":"]"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"# Limit for the string distance when spellchecking using the"}],"source_content_type":"text/x-python","patch_set":44,"id":"ba2be162_bd400258","line":45,"updated":"2017-03-01 15:32:57.000000000","message":"Just a nice to have if they return zero by default, but I\u0027d like to see warnings be optionally fatal, as well.","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"44c615f33dda412d38e73e404a428169be023bfa","unresolved":false,"context_lines":[{"line_number":42,"context_line":"                         \u0027considered for relocation\u0027),"},{"line_number":43,"context_line":"    cfg.StrOpt(\u0027input-file\u0027,"},{"line_number":44,"context_line":"               required\u003dTrue,"},{"line_number":45,"context_line":"               help\u003d\u0027Configuration file to validate\u0027)"},{"line_number":46,"context_line":"]"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"# Limit for the string distance when spellchecking using the"}],"source_content_type":"text/x-python","patch_set":44,"id":"ba2be162_82a38bff","line":45,"in_reply_to":"ba2be162_bd400258","updated":"2017-03-07 16:55:49.000000000","message":"Done","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"8c136974cfb9e35c045e783ec9437f598dceb77c","unresolved":false,"context_lines":[{"line_number":49,"context_line":"# Damerau-Levenshtein algorithm: insertion, deletion, or substitution of a"},{"line_number":50,"context_line":"# single character, or a transposition of two adjacent chars all score a"},{"line_number":51,"context_line":"# distance of 1. A limit of 2 will catch ~95% of real-world typos; 3 and"},{"line_number":52,"context_line":"# above will give false-positives for short strings, 1 gives false-negatives."},{"line_number":53,"context_line":"TYPO_LIMIT \u003d 2"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":""}],"source_content_type":"text/x-python","patch_set":44,"id":"ba2be162_fdcefa58","line":52,"updated":"2017-03-01 15:32:57.000000000","message":"+1","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"761a70462d52ac99c38bb1769f5f19bea94337e7","unresolved":false,"context_lines":[{"line_number":60,"context_line":"    the configuration."},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    :param conf: a ConfigOpts instance"},{"line_number":63,"context_line":"    :raises: DuplicateOptError, ArgsAlreadyParsedError"},{"line_number":64,"context_line":"    \"\"\""},{"line_number":65,"context_line":"    conf.register_cli_opts(_validator_opts)"},{"line_number":66,"context_line":""}],"source_content_type":"text/x-python","patch_set":44,"id":"da36d5c6_d9092d2e","line":63,"updated":"2017-02-21 18:21:33.000000000","message":"the format for :raises: is like\n\n :raises \u003cexception\u003e: \u003cdescription\u003e\n\nsee http://www.sphinx-doc.org/en/stable/domains.html#info-field-lists","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"77c95e3a10eb1623be199bb4611830516342e648","unresolved":false,"context_lines":[{"line_number":60,"context_line":"    the configuration."},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    :param conf: a ConfigOpts instance"},{"line_number":63,"context_line":"    :raises: DuplicateOptError, ArgsAlreadyParsedError"},{"line_number":64,"context_line":"    \"\"\""},{"line_number":65,"context_line":"    conf.register_cli_opts(_validator_opts)"},{"line_number":66,"context_line":""}],"source_content_type":"text/x-python","patch_set":44,"id":"ba2be162_23833ace","line":63,"in_reply_to":"da36d5c6_d9092d2e","updated":"2017-02-28 20:41:25.000000000","message":"Done","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"761a70462d52ac99c38bb1769f5f19bea94337e7","unresolved":false,"context_lines":[{"line_number":83,"context_line":"    \"\"\"Parse namespace options."},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    :param groups: dict of sections from _get_groups"},{"line_number":86,"context_line":"    :returns: dict of namespace sections and options"},{"line_number":87,"context_line":"    \"\"\""},{"line_number":88,"context_line":"    _namespace_opts \u003d {}"},{"line_number":89,"context_line":"    for section, tmp in groups.items():"}],"source_content_type":"text/x-python","patch_set":44,"id":"da36d5c6_f90c313d","line":86,"updated":"2017-02-21 18:21:33.000000000","message":"To document the return type, should use :rtype:","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"77c95e3a10eb1623be199bb4611830516342e648","unresolved":false,"context_lines":[{"line_number":83,"context_line":"    \"\"\"Parse namespace options."},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    :param groups: dict of sections from _get_groups"},{"line_number":86,"context_line":"    :returns: dict of namespace sections and options"},{"line_number":87,"context_line":"    \"\"\""},{"line_number":88,"context_line":"    _namespace_opts \u003d {}"},{"line_number":89,"context_line":"    for section, tmp in groups.items():"}],"source_content_type":"text/x-python","patch_set":44,"id":"ba2be162_43882ee8","line":86,"in_reply_to":"da36d5c6_f90c313d","updated":"2017-02-28 20:41:25.000000000","message":"Done","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"8c136974cfb9e35c045e783ec9437f598dceb77c","unresolved":false,"context_lines":[{"line_number":94,"context_line":"    return _namespace_opts"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"def _format_message(_type, config_item, config_section, item_name, message):"},{"line_number":98,"context_line":"    \"\"\"Format result message."},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    :param _type: message type [\u0027repetition\u0027, \u0027complexity\u0027 ,\u0027deprecation\u0027,"}],"source_content_type":"text/x-python","patch_set":44,"id":"ba2be162_7dccca35","line":97,"updated":"2017-03-01 15:32:57.000000000","message":"It seems like this should be a Message class that knows how to render itself with it\u0027s own __str__() / __unicode__() definition. This function provides little value as-is.","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"56c1afcaa5fdeaad5f9c17d28cd36f45236baf4b","unresolved":false,"context_lines":[{"line_number":94,"context_line":"    return _namespace_opts"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"def _format_message(_type, config_item, config_section, item_name, message):"},{"line_number":98,"context_line":"    \"\"\"Format result message."},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    :param _type: message type [\u0027repetition\u0027, \u0027complexity\u0027 ,\u0027deprecation\u0027,"}],"source_content_type":"text/x-python","patch_set":44,"id":"1a1ced50_57aea0e6","line":97,"in_reply_to":"9a30ddce_c06a3b1a","updated":"2017-03-22 21:20:56.000000000","message":"Done","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"44c615f33dda412d38e73e404a428169be023bfa","unresolved":false,"context_lines":[{"line_number":94,"context_line":"    return _namespace_opts"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"def _format_message(_type, config_item, config_section, item_name, message):"},{"line_number":98,"context_line":"    \"\"\"Format result message."},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    :param _type: message type [\u0027repetition\u0027, \u0027complexity\u0027 ,\u0027deprecation\u0027,"}],"source_content_type":"text/x-python","patch_set":44,"id":"9a30ddce_c06a3b1a","line":97,"in_reply_to":"ba2be162_7dccca35","updated":"2017-03-07 16:55:49.000000000","message":"INW","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"8c136974cfb9e35c045e783ec9437f598dceb77c","unresolved":false,"context_lines":[{"line_number":127,"context_line":"    # either misspelled and/or weren\u0027t found in that particular valid"},{"line_number":128,"context_line":"    # namespace, or don\u0027t belong in the file."},{"line_number":129,"context_line":"    section_suggestions \u003d {}"},{"line_number":130,"context_line":"    if orphaned_input_sections:"},{"line_number":131,"context_line":"        for orphan in orphaned_input_sections:"},{"line_number":132,"context_line":"            section_suggestions.setdefault(orphan, [])"},{"line_number":133,"context_line":"            for possible_suggestion in valid_set:"}],"source_content_type":"text/x-python","patch_set":44,"id":"ba2be162_e04bb129","line":130,"updated":"2017-03-01 15:32:57.000000000","message":"I\u0027d suggest returning early just to save some indentation later.\n\n  if not orphaned_input_sections:\n    return section_suggestions","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"56c1afcaa5fdeaad5f9c17d28cd36f45236baf4b","unresolved":false,"context_lines":[{"line_number":127,"context_line":"    # either misspelled and/or weren\u0027t found in that particular valid"},{"line_number":128,"context_line":"    # namespace, or don\u0027t belong in the file."},{"line_number":129,"context_line":"    section_suggestions \u003d {}"},{"line_number":130,"context_line":"    if orphaned_input_sections:"},{"line_number":131,"context_line":"        for orphan in orphaned_input_sections:"},{"line_number":132,"context_line":"            section_suggestions.setdefault(orphan, [])"},{"line_number":133,"context_line":"            for possible_suggestion in valid_set:"}],"source_content_type":"text/x-python","patch_set":44,"id":"1a1ced50_37220453","line":130,"in_reply_to":"ba2be162_e04bb129","updated":"2017-03-22 21:20:56.000000000","message":"Done","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"8c136974cfb9e35c045e783ec9437f598dceb77c","unresolved":false,"context_lines":[{"line_number":132,"context_line":"            section_suggestions.setdefault(orphan, [])"},{"line_number":133,"context_line":"            for possible_suggestion in valid_set:"},{"line_number":134,"context_line":"                distance \u003d pylev.damerau_levenshtein(orphan,"},{"line_number":135,"context_line":"                                                     possible_suggestion)"},{"line_number":136,"context_line":"                if distance \u003c\u003d TYPO_LIMIT:"},{"line_number":137,"context_line":"                    section_suggestions[orphan].append(possible_suggestion)"},{"line_number":138,"context_line":"    return section_suggestions"}],"source_content_type":"text/x-python","patch_set":44,"id":"ba2be162_406abd81","line":135,"updated":"2017-03-01 15:32:57.000000000","message":"This would end up on one line with the suggestion in L130.","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"56c1afcaa5fdeaad5f9c17d28cd36f45236baf4b","unresolved":false,"context_lines":[{"line_number":132,"context_line":"            section_suggestions.setdefault(orphan, [])"},{"line_number":133,"context_line":"            for possible_suggestion in valid_set:"},{"line_number":134,"context_line":"                distance \u003d pylev.damerau_levenshtein(orphan,"},{"line_number":135,"context_line":"                                                     possible_suggestion)"},{"line_number":136,"context_line":"                if distance \u003c\u003d TYPO_LIMIT:"},{"line_number":137,"context_line":"                    section_suggestions[orphan].append(possible_suggestion)"},{"line_number":138,"context_line":"    return section_suggestions"}],"source_content_type":"text/x-python","patch_set":44,"id":"1a1ced50_b0296ce8","line":135,"in_reply_to":"ba2be162_406abd81","updated":"2017-03-22 21:20:56.000000000","message":"Done","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"8c136974cfb9e35c045e783ec9437f598dceb77c","unresolved":false,"context_lines":[{"line_number":138,"context_line":"    return section_suggestions"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"def _check_option_suggestions(namespace_opts, input_config,"},{"line_number":142,"context_line":"                              ignore_namespace):"},{"line_number":143,"context_line":"    \"\"\"Check option suggestions."},{"line_number":144,"context_line":""}],"source_content_type":"text/x-python","patch_set":44,"id":"ba2be162_936ecdc7","line":141,"updated":"2017-03-01 15:32:57.000000000","message":"This function needs some inline comments to explain what\u0027s going on, because it\u0027s a long method with a lot of very dense code (especially with some of the more complex use of itertools, and the obscure variable names).","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"8c136974cfb9e35c045e783ec9437f598dceb77c","unresolved":false,"context_lines":[{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    :param namespace_opts: parsed namespace sections and options"},{"line_number":149,"context_line":"    :param input_config: parsed configuration file"},{"line_number":150,"context_line":"    :param ignore_namespace: list of namespaces to ignore"},{"line_number":151,"context_line":"    :returns: array of suggestions, array of options misplaced, array of"},{"line_number":152,"context_line":"    leftover options not known in namespace"},{"line_number":153,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":44,"id":"ba2be162_a0129960","line":150,"updated":"2017-03-01 15:32:57.000000000","message":"(nit) the variable name should be plural, given that this is a list of namespaces, not a single namespace to be ignored.","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"56c1afcaa5fdeaad5f9c17d28cd36f45236baf4b","unresolved":false,"context_lines":[{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    :param namespace_opts: parsed namespace sections and options"},{"line_number":149,"context_line":"    :param input_config: parsed configuration file"},{"line_number":150,"context_line":"    :param ignore_namespace: list of namespaces to ignore"},{"line_number":151,"context_line":"    :returns: array of suggestions, array of options misplaced, array of"},{"line_number":152,"context_line":"    leftover options not known in namespace"},{"line_number":153,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":44,"id":"1a1ced50_c03d6390","line":150,"in_reply_to":"ba2be162_a0129960","updated":"2017-03-22 21:20:56.000000000","message":"Done","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"8c136974cfb9e35c045e783ec9437f598dceb77c","unresolved":false,"context_lines":[{"line_number":152,"context_line":"    leftover options not known in namespace"},{"line_number":153,"context_line":"    \"\"\""},{"line_number":154,"context_line":"    orphaned_input_values \u003d {}"},{"line_number":155,"context_line":"    valid_set \u003d {section: frozenset(list(itertools.chain(values)))"},{"line_number":156,"context_line":"                 for section, values in namespace_opts.items()}"},{"line_number":157,"context_line":"    user_section \u003d {section: frozenset(list(itertools.chain(values)))"},{"line_number":158,"context_line":"                    for section, values in input_config.items()}"}],"source_content_type":"text/x-python","patch_set":44,"id":"ba2be162_a0e8d97d","line":155,"updated":"2017-03-01 15:32:57.000000000","message":"(nit on variable naming) valid set of what?","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"56c1afcaa5fdeaad5f9c17d28cd36f45236baf4b","unresolved":false,"context_lines":[{"line_number":152,"context_line":"    leftover options not known in namespace"},{"line_number":153,"context_line":"    \"\"\""},{"line_number":154,"context_line":"    orphaned_input_values \u003d {}"},{"line_number":155,"context_line":"    valid_set \u003d {section: frozenset(list(itertools.chain(values)))"},{"line_number":156,"context_line":"                 for section, values in namespace_opts.items()}"},{"line_number":157,"context_line":"    user_section \u003d {section: frozenset(list(itertools.chain(values)))"},{"line_number":158,"context_line":"                    for section, values in input_config.items()}"}],"source_content_type":"text/x-python","patch_set":44,"id":"1a1ced50_a032270e","line":155,"in_reply_to":"ba2be162_a0e8d97d","updated":"2017-03-22 21:20:56.000000000","message":"Done","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"8c136974cfb9e35c045e783ec9437f598dceb77c","unresolved":false,"context_lines":[{"line_number":154,"context_line":"    orphaned_input_values \u003d {}"},{"line_number":155,"context_line":"    valid_set \u003d {section: frozenset(list(itertools.chain(values)))"},{"line_number":156,"context_line":"                 for section, values in namespace_opts.items()}"},{"line_number":157,"context_line":"    user_section \u003d {section: frozenset(list(itertools.chain(values)))"},{"line_number":158,"context_line":"                    for section, values in input_config.items()}"},{"line_number":159,"context_line":"    ignore_options \u003d frozenset(list(itertools.chain.from_iterable("},{"line_number":160,"context_line":"                               o for s, o in namespace_opts.items()"}],"source_content_type":"text/x-python","patch_set":44,"id":"ba2be162_e05e5144","line":157,"updated":"2017-03-01 15:32:57.000000000","message":"(nit on variable naming) Switching from the input_* prefix to this user_* prefix makes it more difficult for me to follow the data flow.","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"56c1afcaa5fdeaad5f9c17d28cd36f45236baf4b","unresolved":false,"context_lines":[{"line_number":154,"context_line":"    orphaned_input_values \u003d {}"},{"line_number":155,"context_line":"    valid_set \u003d {section: frozenset(list(itertools.chain(values)))"},{"line_number":156,"context_line":"                 for section, values in namespace_opts.items()}"},{"line_number":157,"context_line":"    user_section \u003d {section: frozenset(list(itertools.chain(values)))"},{"line_number":158,"context_line":"                    for section, values in input_config.items()}"},{"line_number":159,"context_line":"    ignore_options \u003d frozenset(list(itertools.chain.from_iterable("},{"line_number":160,"context_line":"                               o for s, o in namespace_opts.items()"}],"source_content_type":"text/x-python","patch_set":44,"id":"1a1ced50_c03723fd","line":157,"in_reply_to":"ba2be162_e05e5144","updated":"2017-03-22 21:20:56.000000000","message":"Done","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"8c136974cfb9e35c045e783ec9437f598dceb77c","unresolved":false,"context_lines":[{"line_number":162,"context_line":"    for section, input_set in user_section.items():"},{"line_number":163,"context_line":"        try:"},{"line_number":164,"context_line":"            valid \u003d frozenset(list(itertools.chain(valid_set[section])))"},{"line_number":165,"context_line":"            inp \u003d frozenset(list(itertools.chain(input_set)))"},{"line_number":166,"context_line":"            diff \u003d inp - valid"},{"line_number":167,"context_line":"        except KeyError:"},{"line_number":168,"context_line":"            continue"}],"source_content_type":"text/x-python","patch_set":44,"id":"ba2be162_40047d16","line":165,"updated":"2017-03-01 15:32:57.000000000","message":"(nit) inp?","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"56c1afcaa5fdeaad5f9c17d28cd36f45236baf4b","unresolved":false,"context_lines":[{"line_number":162,"context_line":"    for section, input_set in user_section.items():"},{"line_number":163,"context_line":"        try:"},{"line_number":164,"context_line":"            valid \u003d frozenset(list(itertools.chain(valid_set[section])))"},{"line_number":165,"context_line":"            inp \u003d frozenset(list(itertools.chain(input_set)))"},{"line_number":166,"context_line":"            diff \u003d inp - valid"},{"line_number":167,"context_line":"        except KeyError:"},{"line_number":168,"context_line":"            continue"}],"source_content_type":"text/x-python","patch_set":44,"id":"1a1ced50_e0389ff0","line":165,"in_reply_to":"ba2be162_40047d16","updated":"2017-03-22 21:20:56.000000000","message":"Done","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"8c136974cfb9e35c045e783ec9437f598dceb77c","unresolved":false,"context_lines":[{"line_number":172,"context_line":"            orphaned_input_values.update({section: non_default_orphans})"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    suggestions \u003d {}"},{"line_number":175,"context_line":"    rehomings \u003d {}"},{"line_number":176,"context_line":"    leftover_orphans \u003d []"},{"line_number":177,"context_line":"    all_values \u003d frozenset("},{"line_number":178,"context_line":"        list(itertools.chain.from_iterable(namespace_opts.values())))"}],"source_content_type":"text/x-python","patch_set":44,"id":"ba2be162_20c5c93b","line":175,"updated":"2017-03-01 15:32:57.000000000","message":"I had to look that word up, and now I\u0027m sad. Inline comments explaining what each of these variables are used for, please.","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"56c1afcaa5fdeaad5f9c17d28cd36f45236baf4b","unresolved":false,"context_lines":[{"line_number":172,"context_line":"            orphaned_input_values.update({section: non_default_orphans})"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    suggestions \u003d {}"},{"line_number":175,"context_line":"    rehomings \u003d {}"},{"line_number":176,"context_line":"    leftover_orphans \u003d []"},{"line_number":177,"context_line":"    all_values \u003d frozenset("},{"line_number":178,"context_line":"        list(itertools.chain.from_iterable(namespace_opts.values())))"}],"source_content_type":"text/x-python","patch_set":44,"id":"1a1ced50_e36b49b7","line":175,"in_reply_to":"ba2be162_20c5c93b","updated":"2017-03-22 21:20:56.000000000","message":"Done","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"8c136974cfb9e35c045e783ec9437f598dceb77c","unresolved":false,"context_lines":[{"line_number":191,"context_line":"                    # NOT misspelled, just a different section"},{"line_number":192,"context_line":"                    rehomings[section_orphan].append(possible_suggestion)"},{"line_number":193,"context_line":"                elif distance \u003c\u003d TYPO_LIMIT:"},{"line_number":194,"context_line":"                    suggestions[section_orphan].append(possible_suggestion)"},{"line_number":195,"context_line":"            if not rehomings[section_orphan]:"},{"line_number":196,"context_line":"                del rehomings[section_orphan]"},{"line_number":197,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":44,"id":"ba2be162_d3f925ca","line":194,"updated":"2017-03-01 15:32:57.000000000","message":"This same pattern of producing a dictionary of suggestions appears in _check_section_suggestions() -- can you refactor that out of both to simplify this function?","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"56c1afcaa5fdeaad5f9c17d28cd36f45236baf4b","unresolved":false,"context_lines":[{"line_number":191,"context_line":"                    # NOT misspelled, just a different section"},{"line_number":192,"context_line":"                    rehomings[section_orphan].append(possible_suggestion)"},{"line_number":193,"context_line":"                elif distance \u003c\u003d TYPO_LIMIT:"},{"line_number":194,"context_line":"                    suggestions[section_orphan].append(possible_suggestion)"},{"line_number":195,"context_line":"            if not rehomings[section_orphan]:"},{"line_number":196,"context_line":"                del rehomings[section_orphan]"},{"line_number":197,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":44,"id":"1a1ced50_f01f64b4","line":194,"in_reply_to":"ba2be162_d3f925ca","updated":"2017-03-22 21:20:56.000000000","message":"Done","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"8c136974cfb9e35c045e783ec9437f598dceb77c","unresolved":false,"context_lines":[{"line_number":238,"context_line":"                _result_message(_sect_misspelled, orphan, \u0027\u0027, suggestion))"},{"line_number":239,"context_line":"        else:"},{"line_number":240,"context_line":"            results[\u0027config_errors\u0027].append("},{"line_number":241,"context_line":"                _result_message(_sect_orphan, orphan, \u0027\u0027, \u0027\u0027))"},{"line_number":242,"context_line":"    return results"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":""}],"source_content_type":"text/x-python","patch_set":44,"id":"ba2be162_93b40df3","line":241,"updated":"2017-03-01 15:32:57.000000000","message":"What are these unnamed arguments? Pass them as kwargs just so the intended usage is clear.","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"44c615f33dda412d38e73e404a428169be023bfa","unresolved":false,"context_lines":[{"line_number":238,"context_line":"                _result_message(_sect_misspelled, orphan, \u0027\u0027, suggestion))"},{"line_number":239,"context_line":"        else:"},{"line_number":240,"context_line":"            results[\u0027config_errors\u0027].append("},{"line_number":241,"context_line":"                _result_message(_sect_orphan, orphan, \u0027\u0027, \u0027\u0027))"},{"line_number":242,"context_line":"    return results"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":""}],"source_content_type":"text/x-python","patch_set":44,"id":"9a30ddce_004c53c6","line":241,"in_reply_to":"ba2be162_93b40df3","updated":"2017-03-07 16:55:49.000000000","message":"Done","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"8c136974cfb9e35c045e783ec9437f598dceb77c","unresolved":false,"context_lines":[{"line_number":244,"context_line":""},{"line_number":245,"context_line":"def _set_misspelled_option_errors(option_suggestions, option_rehomings,"},{"line_number":246,"context_line":"                                  results):"},{"line_number":247,"context_line":"    \"\"\"Add option spelling suggestions to results iff they aren\u0027t being rehomed"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"    :param option_suggestions: suggestions dict keyed on (sect, opt) tuples"},{"line_number":250,"context_line":"    :param option_rehomings: dict of options that can be rehomed"}],"source_content_type":"text/x-python","patch_set":44,"id":"ba2be162_13ae5d85","line":247,"updated":"2017-03-01 15:32:57.000000000","message":"(nit) I assume IFF is if \u0026 only if? But you know someone is going to follow up with a spellcheck patch, anyway. Besides, I don\u0027t think the business logic (the stated condition) of the function should appear in the one line summary, because it could change in the future. Also, missing a period at the end.","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"44c615f33dda412d38e73e404a428169be023bfa","unresolved":false,"context_lines":[{"line_number":244,"context_line":""},{"line_number":245,"context_line":"def _set_misspelled_option_errors(option_suggestions, option_rehomings,"},{"line_number":246,"context_line":"                                  results):"},{"line_number":247,"context_line":"    \"\"\"Add option spelling suggestions to results iff they aren\u0027t being rehomed"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"    :param option_suggestions: suggestions dict keyed on (sect, opt) tuples"},{"line_number":250,"context_line":"    :param option_rehomings: dict of options that can be rehomed"}],"source_content_type":"text/x-python","patch_set":44,"id":"ba2be162_2e47284c","line":247,"in_reply_to":"ba2be162_13ae5d85","updated":"2017-03-07 16:55:49.000000000","message":"Done","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"8c136974cfb9e35c045e783ec9437f598dceb77c","unresolved":false,"context_lines":[{"line_number":278,"context_line":"                         results):"},{"line_number":279,"context_line":"    \"\"\"Add the option advanced, default, and deprecated warnings to the final"},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"    results."},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"    :param valid_option: option to validate with"},{"line_number":284,"context_line":"    :param valid_name: the valid option name"}],"source_content_type":"text/x-python","patch_set":44,"id":"ba2be162_3347e1bc","line":281,"updated":"2017-03-01 15:32:57.000000000","message":"This is going to render as a one line paragraph, and isn\u0027t a valid approach for skirting the one-line summary requirement ;)","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"56c1afcaa5fdeaad5f9c17d28cd36f45236baf4b","unresolved":false,"context_lines":[{"line_number":278,"context_line":"                         results):"},{"line_number":279,"context_line":"    \"\"\"Add the option advanced, default, and deprecated warnings to the final"},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"    results."},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"    :param valid_option: option to validate with"},{"line_number":284,"context_line":"    :param valid_name: the valid option name"}],"source_content_type":"text/x-python","patch_set":44,"id":"1a1ced50_b057ac56","line":281,"in_reply_to":"ba2be162_3347e1bc","updated":"2017-03-22 21:20:56.000000000","message":"Dang! Done.","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"8c136974cfb9e35c045e783ec9437f598dceb77c","unresolved":false,"context_lines":[{"line_number":299,"context_line":"    return results"},{"line_number":300,"context_line":""},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"def _validate(input_file, namespace_config, ignore_namespace):"},{"line_number":303,"context_line":"    \"\"\"Validate the configuration file against namespace options."},{"line_number":304,"context_line":""},{"line_number":305,"context_line":"    :param input_file: path to configuration file"}],"source_content_type":"text/x-python","patch_set":44,"id":"ba2be162_16ae4b85","line":302,"updated":"2017-03-01 15:32:57.000000000","message":"This method is *really* long, and needs some inline comments at the bare minimum, if not further refactoring to simplify the flow.","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"56c1afcaa5fdeaad5f9c17d28cd36f45236baf4b","unresolved":false,"context_lines":[{"line_number":299,"context_line":"    return results"},{"line_number":300,"context_line":""},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"def _validate(input_file, namespace_config, ignore_namespace):"},{"line_number":303,"context_line":"    \"\"\"Validate the configuration file against namespace options."},{"line_number":304,"context_line":""},{"line_number":305,"context_line":"    :param input_file: path to configuration file"}],"source_content_type":"text/x-python","patch_set":44,"id":"1a1ced50_0f4e96c0","line":302,"in_reply_to":"ba2be162_16ae4b85","updated":"2017-03-22 21:20:56.000000000","message":"Done","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"8c136974cfb9e35c045e783ec9437f598dceb77c","unresolved":false,"context_lines":[{"line_number":322,"context_line":"            except KeyError:"},{"line_number":323,"context_line":"                pass"},{"line_number":324,"context_line":"        results \u003d _set_section_errors(section_suggestions, results)"},{"line_number":325,"context_line":"    option_suggestions, option_rehomings, option_leftover_orphans \u003d \\"},{"line_number":326,"context_line":"        _check_option_suggestions(namespace_opts, input_config,"},{"line_number":327,"context_line":"                                  ignore_namespace)"},{"line_number":328,"context_line":""}],"source_content_type":"text/x-python","patch_set":44,"id":"ba2be162_166d6b98","line":325,"updated":"2017-03-01 15:32:57.000000000","message":"(nit) The use of whitespace makes these blocks difficult to visually distinguish. These variables are defined immediately following the previous conditional block, followed by inexplicable whitespace, before further conditional blocks that evaluates them. The blank line is essentially on the wrong side of this line.","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"56c1afcaa5fdeaad5f9c17d28cd36f45236baf4b","unresolved":false,"context_lines":[{"line_number":322,"context_line":"            except KeyError:"},{"line_number":323,"context_line":"                pass"},{"line_number":324,"context_line":"        results \u003d _set_section_errors(section_suggestions, results)"},{"line_number":325,"context_line":"    option_suggestions, option_rehomings, option_leftover_orphans \u003d \\"},{"line_number":326,"context_line":"        _check_option_suggestions(namespace_opts, input_config,"},{"line_number":327,"context_line":"                                  ignore_namespace)"},{"line_number":328,"context_line":""}],"source_content_type":"text/x-python","patch_set":44,"id":"1a1ced50_10e08095","line":325,"in_reply_to":"ba2be162_166d6b98","updated":"2017-03-22 21:20:56.000000000","message":"Done","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"8c136974cfb9e35c045e783ec9437f598dceb77c","unresolved":false,"context_lines":[{"line_number":342,"context_line":"        if valid_section in input_config.keys():"},{"line_number":343,"context_line":"            if valid_section in ignore_namespace:"},{"line_number":344,"context_line":"                continue"},{"line_number":345,"context_line":"            validate_options \u003d input_config[valid_section]"},{"line_number":346,"context_line":"            for valid_name, valid_option in valid_options.items():"},{"line_number":347,"context_line":"                validate_option \u003d validate_options.get(valid_name, False)"},{"line_number":348,"context_line":"                check_choice \u003d True"}],"source_content_type":"text/x-python","patch_set":44,"id":"ba2be162_d67cb322","line":345,"updated":"2017-03-01 15:32:57.000000000","message":"\"validate\" is a verb, which leads to assume this is a callable, but that does not appear to be the case.","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"56c1afcaa5fdeaad5f9c17d28cd36f45236baf4b","unresolved":false,"context_lines":[{"line_number":342,"context_line":"        if valid_section in input_config.keys():"},{"line_number":343,"context_line":"            if valid_section in ignore_namespace:"},{"line_number":344,"context_line":"                continue"},{"line_number":345,"context_line":"            validate_options \u003d input_config[valid_section]"},{"line_number":346,"context_line":"            for valid_name, valid_option in valid_options.items():"},{"line_number":347,"context_line":"                validate_option \u003d validate_options.get(valid_name, False)"},{"line_number":348,"context_line":"                check_choice \u003d True"}],"source_content_type":"text/x-python","patch_set":44,"id":"1a1ced50_73aa9e86","line":345,"in_reply_to":"ba2be162_d67cb322","updated":"2017-03-22 21:20:56.000000000","message":"Done","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"8c136974cfb9e35c045e783ec9437f598dceb77c","unresolved":false,"context_lines":[{"line_number":376,"context_line":"                                        valid_name, \u0027, \"{}\" is not {}\u0027.format("},{"line_number":377,"context_line":"                                            option, valid_option.__class__)))"},{"line_number":378,"context_line":"                else:"},{"line_number":379,"context_line":"                    if valid_option.required and valid_option.default is None:"},{"line_number":380,"context_line":"                        results[\u0027config_errors\u0027].append("},{"line_number":381,"context_line":"                            _result_message(_opt_required_is_missing,"},{"line_number":382,"context_line":"                                            valid_section, valid_name,"}],"source_content_type":"text/x-python","patch_set":44,"id":"ba2be162_3618af1d","line":379,"updated":"2017-03-01 15:32:57.000000000","message":"elif?","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"56c1afcaa5fdeaad5f9c17d28cd36f45236baf4b","unresolved":false,"context_lines":[{"line_number":376,"context_line":"                                        valid_name, \u0027, \"{}\" is not {}\u0027.format("},{"line_number":377,"context_line":"                                            option, valid_option.__class__)))"},{"line_number":378,"context_line":"                else:"},{"line_number":379,"context_line":"                    if valid_option.required and valid_option.default is None:"},{"line_number":380,"context_line":"                        results[\u0027config_errors\u0027].append("},{"line_number":381,"context_line":"                            _result_message(_opt_required_is_missing,"},{"line_number":382,"context_line":"                                            valid_section, valid_name,"}],"source_content_type":"text/x-python","patch_set":44,"id":"1a1ced50_f34daec4","line":379,"in_reply_to":"ba2be162_3618af1d","updated":"2017-03-22 21:20:56.000000000","message":"Done","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"761a70462d52ac99c38bb1769f5f19bea94337e7","unresolved":false,"context_lines":[{"line_number":399,"context_line":"    :param input_file: path to configuration file"},{"line_number":400,"context_line":"    :param namespace_config: namespace options"},{"line_number":401,"context_line":"    :param ignore_namespace: list of namespaces to ignore"},{"line_number":402,"context_line":"    :returns: config_is_valid, results dict from _validate"},{"line_number":403,"context_line":"    \"\"\""},{"line_number":404,"context_line":"    conf \u003d cfg.ConfigOpts()"},{"line_number":405,"context_line":"    conf.register_opts(_validator_opts)"}],"source_content_type":"text/x-python","patch_set":44,"id":"da36d5c6_f92351a5","line":402,"updated":"2017-02-21 18:21:33.000000000","message":"The documentation for private functions (like _validate) aren\u0027t generated in the autodocs, so referring to _validate here isn\u0027t going to be usable by developers.","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"77c95e3a10eb1623be199bb4611830516342e648","unresolved":false,"context_lines":[{"line_number":399,"context_line":"    :param input_file: path to configuration file"},{"line_number":400,"context_line":"    :param namespace_config: namespace options"},{"line_number":401,"context_line":"    :param ignore_namespace: list of namespaces to ignore"},{"line_number":402,"context_line":"    :returns: config_is_valid, results dict from _validate"},{"line_number":403,"context_line":"    \"\"\""},{"line_number":404,"context_line":"    conf \u003d cfg.ConfigOpts()"},{"line_number":405,"context_line":"    conf.register_opts(_validator_opts)"}],"source_content_type":"text/x-python","patch_set":44,"id":"ba2be162_636d3232","line":402,"in_reply_to":"da36d5c6_f92351a5","updated":"2017-02-28 20:41:25.000000000","message":"Done","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"8c136974cfb9e35c045e783ec9437f598dceb77c","unresolved":false,"context_lines":[{"line_number":423,"context_line":"    return result"},{"line_number":424,"context_line":""},{"line_number":425,"context_line":""},{"line_number":426,"context_line":"def _opt_is_default_value():"},{"line_number":427,"context_line":"    \"\"\"Option is set to default value.\"\"\""},{"line_number":428,"context_line":"    return \u0027repetition\u0027, \u0027option\u0027, \u0027{} {} is set to default value {}\u0027"},{"line_number":429,"context_line":""}],"source_content_type":"text/x-python","patch_set":44,"id":"ba2be162_96579b01","line":426,"updated":"2017-03-01 15:32:57.000000000","message":"Why are any of these functions?? They just return constants.","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"56c1afcaa5fdeaad5f9c17d28cd36f45236baf4b","unresolved":false,"context_lines":[{"line_number":423,"context_line":"    return result"},{"line_number":424,"context_line":""},{"line_number":425,"context_line":""},{"line_number":426,"context_line":"def _opt_is_default_value():"},{"line_number":427,"context_line":"    \"\"\"Option is set to default value.\"\"\""},{"line_number":428,"context_line":"    return \u0027repetition\u0027, \u0027option\u0027, \u0027{} {} is set to default value {}\u0027"},{"line_number":429,"context_line":""}],"source_content_type":"text/x-python","patch_set":44,"id":"1a1ced50_6fcd4a30","line":426,"in_reply_to":"9a30ddce_00e373a4","updated":"2017-03-22 21:20:56.000000000","message":"Done","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"44c615f33dda412d38e73e404a428169be023bfa","unresolved":false,"context_lines":[{"line_number":423,"context_line":"    return result"},{"line_number":424,"context_line":""},{"line_number":425,"context_line":""},{"line_number":426,"context_line":"def _opt_is_default_value():"},{"line_number":427,"context_line":"    \"\"\"Option is set to default value.\"\"\""},{"line_number":428,"context_line":"    return \u0027repetition\u0027, \u0027option\u0027, \u0027{} {} is set to default value {}\u0027"},{"line_number":429,"context_line":""}],"source_content_type":"text/x-python","patch_set":44,"id":"9a30ddce_00e373a4","line":426,"in_reply_to":"ba2be162_96579b01","updated":"2017-03-07 16:55:49.000000000","message":"INW","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"8c136974cfb9e35c045e783ec9437f598dceb77c","unresolved":false,"context_lines":[{"line_number":497,"context_line":"def report(results):"},{"line_number":498,"context_line":"    \"\"\"Print results from config validator."},{"line_number":499,"context_line":""},{"line_number":500,"context_line":"    :param results: dict containing errors and warnings"},{"line_number":501,"context_line":"    \"\"\""},{"line_number":502,"context_line":"    config_is_valid \u003d results[0]"},{"line_number":503,"context_line":"    warns \u003d results[1][\u0027config_warnings\u0027]"}],"source_content_type":"text/x-python","patch_set":44,"id":"ba2be162_53bc556c","line":500,"updated":"2017-03-01 15:32:57.000000000","message":"This doesn\u0027t appear to be a dict at all if you\u0027re indexing into it?","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"44c615f33dda412d38e73e404a428169be023bfa","unresolved":false,"context_lines":[{"line_number":497,"context_line":"def report(results):"},{"line_number":498,"context_line":"    \"\"\"Print results from config validator."},{"line_number":499,"context_line":""},{"line_number":500,"context_line":"    :param results: dict containing errors and warnings"},{"line_number":501,"context_line":"    \"\"\""},{"line_number":502,"context_line":"    config_is_valid \u003d results[0]"},{"line_number":503,"context_line":"    warns \u003d results[1][\u0027config_warnings\u0027]"}],"source_content_type":"text/x-python","patch_set":44,"id":"ba2be162_3354ef1f","line":500,"in_reply_to":"ba2be162_53bc556c","updated":"2017-03-07 16:55:49.000000000","message":"Done","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"8c136974cfb9e35c045e783ec9437f598dceb77c","unresolved":false,"context_lines":[{"line_number":503,"context_line":"    warns \u003d results[1][\u0027config_warnings\u0027]"},{"line_number":504,"context_line":"    errs \u003d results[1][\u0027config_errors\u0027]"},{"line_number":505,"context_line":"    report \u003d []"},{"line_number":506,"context_line":"    report.append(\u0027Config file is valid: {}\u0027.format(config_is_valid))"},{"line_number":507,"context_line":"    report.extend([\u0027ERROR: {}\u0027.format(e[\u0027message\u0027]) for e in errs])"},{"line_number":508,"context_line":"    report.extend([\u0027WARNING: {}\u0027.format(w[\u0027message\u0027]) for w in warns])"},{"line_number":509,"context_line":"    print(\u0027\\n\\t\u0027.join(report))"}],"source_content_type":"text/x-python","patch_set":44,"id":"ba2be162_d3dbe5eb","line":506,"updated":"2017-03-01 15:32:57.000000000","message":"I don\u0027t think this line is useful. Use return codes, instead.","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"44c615f33dda412d38e73e404a428169be023bfa","unresolved":false,"context_lines":[{"line_number":503,"context_line":"    warns \u003d results[1][\u0027config_warnings\u0027]"},{"line_number":504,"context_line":"    errs \u003d results[1][\u0027config_errors\u0027]"},{"line_number":505,"context_line":"    report \u003d []"},{"line_number":506,"context_line":"    report.append(\u0027Config file is valid: {}\u0027.format(config_is_valid))"},{"line_number":507,"context_line":"    report.extend([\u0027ERROR: {}\u0027.format(e[\u0027message\u0027]) for e in errs])"},{"line_number":508,"context_line":"    report.extend([\u0027WARNING: {}\u0027.format(w[\u0027message\u0027]) for w in warns])"},{"line_number":509,"context_line":"    print(\u0027\\n\\t\u0027.join(report))"}],"source_content_type":"text/x-python","patch_set":44,"id":"ba2be162_e2c36787","line":506,"in_reply_to":"ba2be162_d3dbe5eb","updated":"2017-03-07 16:55:49.000000000","message":"Done","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"8c136974cfb9e35c045e783ec9437f598dceb77c","unresolved":false,"context_lines":[{"line_number":506,"context_line":"    report.append(\u0027Config file is valid: {}\u0027.format(config_is_valid))"},{"line_number":507,"context_line":"    report.extend([\u0027ERROR: {}\u0027.format(e[\u0027message\u0027]) for e in errs])"},{"line_number":508,"context_line":"    report.extend([\u0027WARNING: {}\u0027.format(w[\u0027message\u0027]) for w in warns])"},{"line_number":509,"context_line":"    print(\u0027\\n\\t\u0027.join(report))"},{"line_number":510,"context_line":""},{"line_number":511,"context_line":""},{"line_number":512,"context_line":"def main(args\u003dNone):"}],"source_content_type":"text/x-python","patch_set":44,"id":"ba2be162_96207b9d","line":509,"updated":"2017-03-01 15:32:57.000000000","message":"I don\u0027t see any value in the indentation.","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"44c615f33dda412d38e73e404a428169be023bfa","unresolved":false,"context_lines":[{"line_number":506,"context_line":"    report.append(\u0027Config file is valid: {}\u0027.format(config_is_valid))"},{"line_number":507,"context_line":"    report.extend([\u0027ERROR: {}\u0027.format(e[\u0027message\u0027]) for e in errs])"},{"line_number":508,"context_line":"    report.extend([\u0027WARNING: {}\u0027.format(w[\u0027message\u0027]) for w in warns])"},{"line_number":509,"context_line":"    print(\u0027\\n\\t\u0027.join(report))"},{"line_number":510,"context_line":""},{"line_number":511,"context_line":""},{"line_number":512,"context_line":"def main(args\u003dNone):"}],"source_content_type":"text/x-python","patch_set":44,"id":"ba2be162_02bddb01","line":509,"in_reply_to":"ba2be162_96207b9d","updated":"2017-03-07 16:55:49.000000000","message":"Done","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"8c136974cfb9e35c045e783ec9437f598dceb77c","unresolved":false,"context_lines":[{"line_number":518,"context_line":"    conf(args, version\u003dversion)"},{"line_number":519,"context_line":""},{"line_number":520,"context_line":"    results \u003d validate(conf.input_file, _list_opts(conf.namespace),"},{"line_number":521,"context_line":"                       conf.ignore_namespace or [])"},{"line_number":522,"context_line":"    report(results)"},{"line_number":523,"context_line":""},{"line_number":524,"context_line":""}],"source_content_type":"text/x-python","patch_set":44,"id":"ba2be162_334c41c7","line":521,"updated":"2017-03-01 15:32:57.000000000","message":"If this option had a reasonable default value (an empty list), then you wouldn\u0027t have to be defensive about the null value.","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"44c615f33dda412d38e73e404a428169be023bfa","unresolved":false,"context_lines":[{"line_number":518,"context_line":"    conf(args, version\u003dversion)"},{"line_number":519,"context_line":""},{"line_number":520,"context_line":"    results \u003d validate(conf.input_file, _list_opts(conf.namespace),"},{"line_number":521,"context_line":"                       conf.ignore_namespace or [])"},{"line_number":522,"context_line":"    report(results)"},{"line_number":523,"context_line":""},{"line_number":524,"context_line":""}],"source_content_type":"text/x-python","patch_set":44,"id":"ba2be162_e6473749","line":521,"in_reply_to":"ba2be162_334c41c7","updated":"2017-03-07 16:55:49.000000000","message":"Done","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"8c136974cfb9e35c045e783ec9437f598dceb77c","unresolved":false,"context_lines":[{"line_number":519,"context_line":""},{"line_number":520,"context_line":"    results \u003d validate(conf.input_file, _list_opts(conf.namespace),"},{"line_number":521,"context_line":"                       conf.ignore_namespace or [])"},{"line_number":522,"context_line":"    report(results)"},{"line_number":523,"context_line":""},{"line_number":524,"context_line":""},{"line_number":525,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"}],"source_content_type":"text/x-python","patch_set":44,"id":"ba2be162_53ee158c","line":522,"updated":"2017-03-01 15:32:57.000000000","message":"Provide operators with useful return codes! Otherwise, I basically can\u0027t reasonably consume this module. At minimum, something like:\n\n  raise SystemExit(not config_is_valid)\n\nAlthough more detailed return codes would be useful, as well:\n\n  1: config file unreadable\n  2: errors in config file\n  3: no errors but warnings in config file, with fatal warnings enabled","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"44c615f33dda412d38e73e404a428169be023bfa","unresolved":false,"context_lines":[{"line_number":519,"context_line":""},{"line_number":520,"context_line":"    results \u003d validate(conf.input_file, _list_opts(conf.namespace),"},{"line_number":521,"context_line":"                       conf.ignore_namespace or [])"},{"line_number":522,"context_line":"    report(results)"},{"line_number":523,"context_line":""},{"line_number":524,"context_line":""},{"line_number":525,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"}],"source_content_type":"text/x-python","patch_set":44,"id":"9a30ddce_c0ff9b32","line":522,"in_reply_to":"ba2be162_53ee158c","updated":"2017-03-07 16:55:49.000000000","message":"Done","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"5c88a88c008bd71354d561ad80c25c44aa63c545","unresolved":false,"context_lines":[{"line_number":45,"context_line":"                         \u0027considered for relocation\u0027),"},{"line_number":46,"context_line":"    cfg.StrOpt(\u0027input-file\u0027,"},{"line_number":47,"context_line":"               required\u003dTrue,"},{"line_number":48,"context_line":"               help\u003d\u0027Configuration file to validate\u0027),"},{"line_number":49,"context_line":"    cfg.BoolOpt(\u0027fatal-warnings\u0027,"},{"line_number":50,"context_line":"                required\u003dFalse,"},{"line_number":51,"context_line":"                default\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":48,"id":"ffe62b97_dbc53d90","line":48,"updated":"2017-03-24 20:49:25.000000000","message":"If you add:\n\n  positional\u003dTrue\n\nThen you won\u0027t have to pass --input-file on the command line, as it\u0027s a required argument anyway.","commit_id":"c9b4acaf1933aa9b436252ac50498fcd5332c4b0"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"8b7af9babd31da10b9702154f38919d2d550da22","unresolved":false,"context_lines":[{"line_number":45,"context_line":"                         \u0027considered for relocation\u0027),"},{"line_number":46,"context_line":"    cfg.StrOpt(\u0027input-file\u0027,"},{"line_number":47,"context_line":"               required\u003dTrue,"},{"line_number":48,"context_line":"               help\u003d\u0027Configuration file to validate\u0027),"},{"line_number":49,"context_line":"    cfg.BoolOpt(\u0027fatal-warnings\u0027,"},{"line_number":50,"context_line":"                required\u003dFalse,"},{"line_number":51,"context_line":"                default\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":48,"id":"ffe62b97_b557daca","line":48,"in_reply_to":"ffe62b97_923d0cdf","updated":"2017-03-27 20:07:45.000000000","message":"Yes, I added positional\u003dTrue here, then removed the --input-file, like in the example, and I get this exception no matter where in the list of arguments I place the path to the file. Full trace:\n\nTraceback (most recent call last):\n  File \"/home/john/.virtualenvs/conf/bin/oslo-config-validator\", line 10, in \u003cmodule\u003e\n    sys.exit(main())\n  File \"/home/john/code/oslo.config/oslo_config/validator.py\", line 593, in main\n    conf(args, version\u003dversion)\n  File \"/home/john/code/oslo.config/oslo_config/cfg.py\", line 2378, in __call__\n    self._check_required_opts()\n  File \"/home/john/code/oslo.config/oslo_config/cfg.py\", line 3030, in _check_required_opts\n    raise RequiredOptError(opt.name, group)\noslo_config.cfg.RequiredOptError: value required for option input-file in group [DEFAULT]","commit_id":"c9b4acaf1933aa9b436252ac50498fcd5332c4b0"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"b7272e65dffe0fb38348a95f5390405983bdcb7a","unresolved":false,"context_lines":[{"line_number":45,"context_line":"                         \u0027considered for relocation\u0027),"},{"line_number":46,"context_line":"    cfg.StrOpt(\u0027input-file\u0027,"},{"line_number":47,"context_line":"               required\u003dTrue,"},{"line_number":48,"context_line":"               help\u003d\u0027Configuration file to validate\u0027),"},{"line_number":49,"context_line":"    cfg.BoolOpt(\u0027fatal-warnings\u0027,"},{"line_number":50,"context_line":"                required\u003dFalse,"},{"line_number":51,"context_line":"                default\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":48,"id":"ffe62b97_923d0cdf","line":48,"in_reply_to":"ffe62b97_926f4cfb","updated":"2017-03-27 19:57:53.000000000","message":"... calling it like in the neutron example? https://review.openstack.org/#/c/384559/48..49/doc/source/validator.rst,unified","commit_id":"c9b4acaf1933aa9b436252ac50498fcd5332c4b0"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"de11bfda72ecdce515fad9795a8a9b12573fc0be","unresolved":false,"context_lines":[{"line_number":45,"context_line":"                         \u0027considered for relocation\u0027),"},{"line_number":46,"context_line":"    cfg.StrOpt(\u0027input-file\u0027,"},{"line_number":47,"context_line":"               required\u003dTrue,"},{"line_number":48,"context_line":"               help\u003d\u0027Configuration file to validate\u0027),"},{"line_number":49,"context_line":"    cfg.BoolOpt(\u0027fatal-warnings\u0027,"},{"line_number":50,"context_line":"                required\u003dFalse,"},{"line_number":51,"context_line":"                default\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":48,"id":"ffe62b97_f8668729","line":48,"in_reply_to":"ffe62b97_dbc53d90","updated":"2017-03-27 17:34:41.000000000","message":"I tried implementing this but I get this error no matter where in the args I put the option:\n\noslo_config.cfg.RequiredOptError: value required for option input-file in group [DEFAULT]\n\nAny ideas on what I\u0027m doing wrong here?","commit_id":"c9b4acaf1933aa9b436252ac50498fcd5332c4b0"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"ed0b364f9ada60cf03633922080afff36640d2c0","unresolved":false,"context_lines":[{"line_number":45,"context_line":"                         \u0027considered for relocation\u0027),"},{"line_number":46,"context_line":"    cfg.StrOpt(\u0027input-file\u0027,"},{"line_number":47,"context_line":"               required\u003dTrue,"},{"line_number":48,"context_line":"               help\u003d\u0027Configuration file to validate\u0027),"},{"line_number":49,"context_line":"    cfg.BoolOpt(\u0027fatal-warnings\u0027,"},{"line_number":50,"context_line":"                required\u003dFalse,"},{"line_number":51,"context_line":"                default\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":48,"id":"ffe62b97_926f4cfb","line":48,"in_reply_to":"ffe62b97_f8668729","updated":"2017-03-27 19:53:36.000000000","message":"What are you doing to trigger this exception, for example? And what\u0027s the full traceback?","commit_id":"c9b4acaf1933aa9b436252ac50498fcd5332c4b0"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"5c88a88c008bd71354d561ad80c25c44aa63c545","unresolved":false,"context_lines":[{"line_number":110,"context_line":"        for namespace_options in tmp[\u0027namespaces\u0027]:"},{"line_number":111,"context_line":"            options \u003d namespace_options[1]"},{"line_number":112,"context_line":"            _namespace_opts.setdefault(section, {}).update("},{"line_number":113,"context_line":"                {opt.dest if opt.dest else opt.name: opt for opt in options})"},{"line_number":114,"context_line":"    return _namespace_opts"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":""}],"source_content_type":"text/x-python","patch_set":48,"id":"ffe62b97_e6c50490","line":113,"updated":"2017-03-24 20:49:25.000000000","message":"^ lol\n\nThis probably deserves an inline comment, or to be written out in more than one line (python newbies will choke!).","commit_id":"c9b4acaf1933aa9b436252ac50498fcd5332c4b0"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"de11bfda72ecdce515fad9795a8a9b12573fc0be","unresolved":false,"context_lines":[{"line_number":110,"context_line":"        for namespace_options in tmp[\u0027namespaces\u0027]:"},{"line_number":111,"context_line":"            options \u003d namespace_options[1]"},{"line_number":112,"context_line":"            _namespace_opts.setdefault(section, {}).update("},{"line_number":113,"context_line":"                {opt.dest if opt.dest else opt.name: opt for opt in options})"},{"line_number":114,"context_line":"    return _namespace_opts"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":""}],"source_content_type":"text/x-python","patch_set":48,"id":"ffe62b97_6b0e1c33","line":113,"in_reply_to":"ffe62b97_e6c50490","updated":"2017-03-27 17:34:41.000000000","message":"Done","commit_id":"c9b4acaf1933aa9b436252ac50498fcd5332c4b0"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"5c88a88c008bd71354d561ad80c25c44aa63c545","unresolved":false,"context_lines":[{"line_number":174,"context_line":"            leftover options not known in namespace"},{"line_number":175,"context_line":"    \"\"\""},{"line_number":176,"context_line":"    # create a dict of all valid namespaces and options, structured as:"},{"line_number":177,"context_line":"    # {\u0027section_string\u0027: frozenset([\u0027option_string\u0027, ...]), ...}"},{"line_number":178,"context_line":"    # These frozensets are used to prevent unintentionally altering the content"},{"line_number":179,"context_line":"    # and allow us to perform the necessary set math operatons later"},{"line_number":180,"context_line":"    valid_config_lookup \u003d {section: frozenset(list(itertools.chain(values)))"}],"source_content_type":"text/x-python","patch_set":48,"id":"ffe62b97_06bb48e2","line":177,"updated":"2017-03-24 20:49:25.000000000","message":"section_name \u0026 option_name?\n\nor like section1 \u0026 option1?","commit_id":"c9b4acaf1933aa9b436252ac50498fcd5332c4b0"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"de11bfda72ecdce515fad9795a8a9b12573fc0be","unresolved":false,"context_lines":[{"line_number":174,"context_line":"            leftover options not known in namespace"},{"line_number":175,"context_line":"    \"\"\""},{"line_number":176,"context_line":"    # create a dict of all valid namespaces and options, structured as:"},{"line_number":177,"context_line":"    # {\u0027section_string\u0027: frozenset([\u0027option_string\u0027, ...]), ...}"},{"line_number":178,"context_line":"    # These frozensets are used to prevent unintentionally altering the content"},{"line_number":179,"context_line":"    # and allow us to perform the necessary set math operatons later"},{"line_number":180,"context_line":"    valid_config_lookup \u003d {section: frozenset(list(itertools.chain(values)))"}],"source_content_type":"text/x-python","patch_set":48,"id":"ffe62b97_2b3134ed","line":177,"in_reply_to":"ffe62b97_06bb48e2","updated":"2017-03-27 17:34:41.000000000","message":"Done","commit_id":"c9b4acaf1933aa9b436252ac50498fcd5332c4b0"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"5c88a88c008bd71354d561ad80c25c44aa63c545","unresolved":false,"context_lines":[{"line_number":342,"context_line":"    :param valid_name: the valid option name"},{"line_number":343,"context_line":"    :param valid_section: valid section name"},{"line_number":344,"context_line":"    :param validate_opt: the option to validate"},{"line_number":345,"context_line":"    :param results: list of all results"},{"line_number":346,"context_line":"    :rtype: dict of results appended with new warnings"},{"line_number":347,"context_line":"    \"\"\""},{"line_number":348,"context_line":"    if valid_option.advanced:"}],"source_content_type":"text/x-python","patch_set":48,"id":"ffe62b97_26a52c05","line":345,"updated":"2017-03-24 20:49:25.000000000","message":"On all of these docstrings for the results param: results is a dictionary, not a list.","commit_id":"c9b4acaf1933aa9b436252ac50498fcd5332c4b0"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"de11bfda72ecdce515fad9795a8a9b12573fc0be","unresolved":false,"context_lines":[{"line_number":342,"context_line":"    :param valid_name: the valid option name"},{"line_number":343,"context_line":"    :param valid_section: valid section name"},{"line_number":344,"context_line":"    :param validate_opt: the option to validate"},{"line_number":345,"context_line":"    :param results: list of all results"},{"line_number":346,"context_line":"    :rtype: dict of results appended with new warnings"},{"line_number":347,"context_line":"    \"\"\""},{"line_number":348,"context_line":"    if valid_option.advanced:"}],"source_content_type":"text/x-python","patch_set":48,"id":"ffe62b97_0b85505a","line":345,"in_reply_to":"ffe62b97_26a52c05","updated":"2017-03-27 17:34:41.000000000","message":"Done","commit_id":"c9b4acaf1933aa9b436252ac50498fcd5332c4b0"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"b7272e65dffe0fb38348a95f5390405983bdcb7a","unresolved":false,"context_lines":[{"line_number":343,"context_line":"    :param valid_section: valid section name"},{"line_number":344,"context_line":"    :param validate_opt: the option to validate"},{"line_number":345,"context_line":"    :param results: list of all results"},{"line_number":346,"context_line":"    :rtype: dict of results appended with new warnings"},{"line_number":347,"context_line":"    \"\"\""},{"line_number":348,"context_line":"    if valid_option.advanced:"},{"line_number":349,"context_line":"        results[\u0027config_warnings\u0027].append(Message(message_type\u003d\u0027advanced\u0027,"}],"source_content_type":"text/x-python","patch_set":48,"id":"ffe62b97_950bb622","line":346,"updated":"2017-03-27 19:57:53.000000000","message":"The return type definitions should be dropped as well, since the \"return results\" were dropped.","commit_id":"c9b4acaf1933aa9b436252ac50498fcd5332c4b0"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"8b7af9babd31da10b9702154f38919d2d550da22","unresolved":false,"context_lines":[{"line_number":343,"context_line":"    :param valid_section: valid section name"},{"line_number":344,"context_line":"    :param validate_opt: the option to validate"},{"line_number":345,"context_line":"    :param results: list of all results"},{"line_number":346,"context_line":"    :rtype: dict of results appended with new warnings"},{"line_number":347,"context_line":"    \"\"\""},{"line_number":348,"context_line":"    if valid_option.advanced:"},{"line_number":349,"context_line":"        results[\u0027config_warnings\u0027].append(Message(message_type\u003d\u0027advanced\u0027,"}],"source_content_type":"text/x-python","patch_set":48,"id":"ffe62b97_f58b221c","line":346,"in_reply_to":"ffe62b97_950bb622","updated":"2017-03-27 20:07:45.000000000","message":"Done","commit_id":"c9b4acaf1933aa9b436252ac50498fcd5332c4b0"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"5c88a88c008bd71354d561ad80c25c44aa63c545","unresolved":false,"context_lines":[{"line_number":386,"context_line":"            except KeyError:"},{"line_number":387,"context_line":"                pass  # do nothing if an ignored section isn\u0027t suggested"},{"line_number":388,"context_line":"        # create and add the section errors to results dict for this section"},{"line_number":389,"context_line":"        results \u003d _set_section_errors(section_suggestions, results)"},{"line_number":390,"context_line":""},{"line_number":391,"context_line":"    option_suggestions, option_rehomings, option_leftover_orphans \u003d \\"},{"line_number":392,"context_line":"        _check_option_suggestions(namespace_opts, input_config,"}],"source_content_type":"text/x-python","patch_set":48,"id":"ffe62b97_8619987a","line":389,"updated":"2017-03-24 20:49:25.000000000","message":"For all of these checks, there\u0027s no reason to pass the result dict in and re-assign the return value to results, because results itself is never modified at all (it\u0027s just a reference to a mutable dict, where the contents of the dict are modified). The simplest way to improve this would be to continue passing the results dict in, but drop the \"return results\" from them all, and skip the assignment back to results here.\n\nThat said, I could also argue that passing the results dictionary around is a bit of an anti-pattern, as it doesn\u0027t do much to enforce a contract between the validate function and the individual checks (a check could remove errors/warnings produced by another check, for example)... but I don\u0027t think that\u0027s a big deal here.","commit_id":"c9b4acaf1933aa9b436252ac50498fcd5332c4b0"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"de11bfda72ecdce515fad9795a8a9b12573fc0be","unresolved":false,"context_lines":[{"line_number":386,"context_line":"            except KeyError:"},{"line_number":387,"context_line":"                pass  # do nothing if an ignored section isn\u0027t suggested"},{"line_number":388,"context_line":"        # create and add the section errors to results dict for this section"},{"line_number":389,"context_line":"        results \u003d _set_section_errors(section_suggestions, results)"},{"line_number":390,"context_line":""},{"line_number":391,"context_line":"    option_suggestions, option_rehomings, option_leftover_orphans \u003d \\"},{"line_number":392,"context_line":"        _check_option_suggestions(namespace_opts, input_config,"}],"source_content_type":"text/x-python","patch_set":48,"id":"ffe62b97_eba46cbb","line":389,"in_reply_to":"ffe62b97_8619987a","updated":"2017-03-27 17:34:41.000000000","message":"Done","commit_id":"c9b4acaf1933aa9b436252ac50498fcd5332c4b0"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"5c88a88c008bd71354d561ad80c25c44aa63c545","unresolved":false,"context_lines":[{"line_number":421,"context_line":"                                                   valid_section,"},{"line_number":422,"context_line":"                                                   option_to_check, results)"},{"line_number":423,"context_line":"                    if hasattr(valid_option.type, \u0027choices\u0027):"},{"line_number":424,"context_line":"                        if valid_option.type.choices:"},{"line_number":425,"context_line":"                            for choice in option_to_check:"},{"line_number":426,"context_line":"                                if choice and choice not in \\"},{"line_number":427,"context_line":"                                        valid_option.type.choices:"}],"source_content_type":"text/x-python","patch_set":48,"id":"ffe62b97_1b3ba5eb","line":424,"updated":"2017-03-24 20:49:25.000000000","message":"if hasattr(valid_option.type, \u0027choices\u0027) and valid_option.type.choices:","commit_id":"c9b4acaf1933aa9b436252ac50498fcd5332c4b0"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"de11bfda72ecdce515fad9795a8a9b12573fc0be","unresolved":false,"context_lines":[{"line_number":421,"context_line":"                                                   valid_section,"},{"line_number":422,"context_line":"                                                   option_to_check, results)"},{"line_number":423,"context_line":"                    if hasattr(valid_option.type, \u0027choices\u0027):"},{"line_number":424,"context_line":"                        if valid_option.type.choices:"},{"line_number":425,"context_line":"                            for choice in option_to_check:"},{"line_number":426,"context_line":"                                if choice and choice not in \\"},{"line_number":427,"context_line":"                                        valid_option.type.choices:"}],"source_content_type":"text/x-python","patch_set":48,"id":"ffe62b97_4bc6b84a","line":424,"in_reply_to":"ffe62b97_1b3ba5eb","updated":"2017-03-27 17:34:41.000000000","message":"Done","commit_id":"c9b4acaf1933aa9b436252ac50498fcd5332c4b0"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"2ebdbeccdb0f5b972338c3becfbfbff577fca643","unresolved":false,"context_lines":[{"line_number":433,"context_line":"                                        item_name\u003dvalid_name,"},{"line_number":434,"context_line":"                                        option_value\u003dvalid_option.type.choices,"},{"line_number":435,"context_line":"                                        data\u003dchoice))"},{"line_number":436,"context_line":"                    if len(option_to_check) \u003d\u003d 1:"},{"line_number":437,"context_line":"                        if len(str(option_to_check[0])) \u003d\u003d 0:"},{"line_number":438,"context_line":"                            # the option is set to a blank string. This is only"},{"line_number":439,"context_line":"                            # valid if the allow_no_value flag was passed to"},{"line_number":440,"context_line":"                            # configparser - oslo.config doesn\u0027t do this."},{"line_number":441,"context_line":"                            # Projects that need to utilize values like None"}],"source_content_type":"text/x-python","patch_set":48,"id":"ffe62b97_98989bc0","line":438,"range":{"start_line":436,"start_character":0,"end_line":438,"end_character":1},"updated":"2017-03-27 15:57:14.000000000","message":"if len(option_to_check) \u003d\u003d 1 and len(str(option_to_check[0])) \u003d\u003d 0:","commit_id":"c9b4acaf1933aa9b436252ac50498fcd5332c4b0"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"de11bfda72ecdce515fad9795a8a9b12573fc0be","unresolved":false,"context_lines":[{"line_number":433,"context_line":"                                        item_name\u003dvalid_name,"},{"line_number":434,"context_line":"                                        option_value\u003dvalid_option.type.choices,"},{"line_number":435,"context_line":"                                        data\u003dchoice))"},{"line_number":436,"context_line":"                    if len(option_to_check) \u003d\u003d 1:"},{"line_number":437,"context_line":"                        if len(str(option_to_check[0])) \u003d\u003d 0:"},{"line_number":438,"context_line":"                            # the option is set to a blank string. This is only"},{"line_number":439,"context_line":"                            # valid if the allow_no_value flag was passed to"},{"line_number":440,"context_line":"                            # configparser - oslo.config doesn\u0027t do this."},{"line_number":441,"context_line":"                            # Projects that need to utilize values like None"}],"source_content_type":"text/x-python","patch_set":48,"id":"ffe62b97_6bf5fc82","line":438,"range":{"start_line":436,"start_character":0,"end_line":438,"end_character":1},"in_reply_to":"ffe62b97_98989bc0","updated":"2017-03-27 17:34:41.000000000","message":"Done","commit_id":"c9b4acaf1933aa9b436252ac50498fcd5332c4b0"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"5c88a88c008bd71354d561ad80c25c44aa63c545","unresolved":false,"context_lines":[{"line_number":489,"context_line":"    return _validate(input_file, namespace_config, ignore_sections)"},{"line_number":490,"context_line":""},{"line_number":491,"context_line":""},{"line_number":492,"context_line":"class Message(object):"},{"line_number":493,"context_line":"    def __init__(self, message_type, config_item, config_section, item_name,"},{"line_number":494,"context_line":"                 option_value\u003dNone, data\u003dNone):"},{"line_number":495,"context_line":"        \"\"\"Create an object that represents an error or warning."}],"source_content_type":"text/x-python","patch_set":48,"id":"ffe62b97_9b9215f6","line":492,"updated":"2017-03-24 20:49:25.000000000","message":"Nice! This whole class is really easy to understand.","commit_id":"c9b4acaf1933aa9b436252ac50498fcd5332c4b0"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"5c88a88c008bd71354d561ad80c25c44aa63c545","unresolved":false,"context_lines":[{"line_number":501,"context_line":"        :param config_section: valid section in namespace"},{"line_number":502,"context_line":"        :param item_name: valid option name"},{"line_number":503,"context_line":"        :param option_value: list of valid option values"},{"line_number":504,"context_line":"        :param data: placeholder for values not stored elsewhere"},{"line_number":505,"context_line":"        \"\"\""},{"line_number":506,"context_line":""},{"line_number":507,"context_line":"        self.message_type \u003d message_type"}],"source_content_type":"text/x-python","patch_set":48,"id":"ffe62b97_fb7121e2","line":504,"updated":"2017-03-24 20:49:25.000000000","message":"This comment isn\u0027t particularly useful, without looking at the implementations and existing callers.","commit_id":"c9b4acaf1933aa9b436252ac50498fcd5332c4b0"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"de11bfda72ecdce515fad9795a8a9b12573fc0be","unresolved":false,"context_lines":[{"line_number":501,"context_line":"        :param config_section: valid section in namespace"},{"line_number":502,"context_line":"        :param item_name: valid option name"},{"line_number":503,"context_line":"        :param option_value: list of valid option values"},{"line_number":504,"context_line":"        :param data: placeholder for values not stored elsewhere"},{"line_number":505,"context_line":"        \"\"\""},{"line_number":506,"context_line":""},{"line_number":507,"context_line":"        self.message_type \u003d message_type"}],"source_content_type":"text/x-python","patch_set":48,"id":"ffe62b97_cb352848","line":504,"in_reply_to":"ffe62b97_fb7121e2","updated":"2017-03-27 17:34:41.000000000","message":"Done","commit_id":"c9b4acaf1933aa9b436252ac50498fcd5332c4b0"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"5c88a88c008bd71354d561ad80c25c44aa63c545","unresolved":false,"context_lines":[{"line_number":565,"context_line":""},{"line_number":566,"context_line":""},{"line_number":567,"context_line":"def report(results):"},{"line_number":568,"context_line":"    \"\"\"Print results from config validator."},{"line_number":569,"context_line":""},{"line_number":570,"context_line":"    :param results: dict containing errors and warnings"},{"line_number":571,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":48,"id":"ffe62b97_db889dc7","line":568,"updated":"2017-03-24 20:49:25.000000000","message":"It doesn\u0027t actually print anything, but instead just builds the report.","commit_id":"c9b4acaf1933aa9b436252ac50498fcd5332c4b0"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"de11bfda72ecdce515fad9795a8a9b12573fc0be","unresolved":false,"context_lines":[{"line_number":565,"context_line":""},{"line_number":566,"context_line":""},{"line_number":567,"context_line":"def report(results):"},{"line_number":568,"context_line":"    \"\"\"Print results from config validator."},{"line_number":569,"context_line":""},{"line_number":570,"context_line":"    :param results: dict containing errors and warnings"},{"line_number":571,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":48,"id":"ffe62b97_aea8b2da","line":568,"in_reply_to":"ffe62b97_db889dc7","updated":"2017-03-27 17:34:41.000000000","message":"Done","commit_id":"c9b4acaf1933aa9b436252ac50498fcd5332c4b0"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"5c88a88c008bd71354d561ad80c25c44aa63c545","unresolved":false,"context_lines":[{"line_number":572,"context_line":"    warns \u003d results[\u0027config_warnings\u0027]"},{"line_number":573,"context_line":"    errs \u003d results[\u0027config_errors\u0027]"},{"line_number":574,"context_line":"    validation_report \u003d \u0027\u0027"},{"line_number":575,"context_line":"    if len(errs) \u003d\u003d 0 and len(warns) \u003d\u003d 0:"},{"line_number":576,"context_line":"        # feedback if nothing was reported, otherwise the user may think there"},{"line_number":577,"context_line":"        # is a problem with the validator"},{"line_number":578,"context_line":"        return \u0027Success! The config file appears to be valid.\u0027"}],"source_content_type":"text/x-python","patch_set":48,"id":"ffe62b97_3bcc2934","line":575,"updated":"2017-03-24 20:49:25.000000000","message":"This can be simplified to:\n\n  if not errs and not warns:\n\nor\n\n  if not (errs or warns):","commit_id":"c9b4acaf1933aa9b436252ac50498fcd5332c4b0"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"de11bfda72ecdce515fad9795a8a9b12573fc0be","unresolved":false,"context_lines":[{"line_number":572,"context_line":"    warns \u003d results[\u0027config_warnings\u0027]"},{"line_number":573,"context_line":"    errs \u003d results[\u0027config_errors\u0027]"},{"line_number":574,"context_line":"    validation_report \u003d \u0027\u0027"},{"line_number":575,"context_line":"    if len(errs) \u003d\u003d 0 and len(warns) \u003d\u003d 0:"},{"line_number":576,"context_line":"        # feedback if nothing was reported, otherwise the user may think there"},{"line_number":577,"context_line":"        # is a problem with the validator"},{"line_number":578,"context_line":"        return \u0027Success! The config file appears to be valid.\u0027"}],"source_content_type":"text/x-python","patch_set":48,"id":"ffe62b97_6e9e2a55","line":575,"in_reply_to":"ffe62b97_3bcc2934","updated":"2017-03-27 17:34:41.000000000","message":"Done","commit_id":"c9b4acaf1933aa9b436252ac50498fcd5332c4b0"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"5c88a88c008bd71354d561ad80c25c44aa63c545","unresolved":false,"context_lines":[{"line_number":597,"context_line":"        print(report(results))"},{"line_number":598,"context_line":""},{"line_number":599,"context_line":"    warnings \u003d results[\u0027config_warnings\u0027]"},{"line_number":600,"context_line":"    is_valid \u003d len(results[\u0027config_errors\u0027]) \u003d\u003d 0"},{"line_number":601,"context_line":"    if is_valid and (conf.fatal_warnings and warnings):"},{"line_number":602,"context_line":"        sys.exit(3)"},{"line_number":603,"context_line":""}],"source_content_type":"text/x-python","patch_set":48,"id":"ffe62b97_dbf9bd80","line":600,"updated":"2017-03-24 20:49:25.000000000","message":"Any reason not to just call this \"errors\", and treat it just like warnings? If so, then the following lines would become (which read more logically to me):","commit_id":"c9b4acaf1933aa9b436252ac50498fcd5332c4b0"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"de11bfda72ecdce515fad9795a8a9b12573fc0be","unresolved":false,"context_lines":[{"line_number":597,"context_line":"        print(report(results))"},{"line_number":598,"context_line":""},{"line_number":599,"context_line":"    warnings \u003d results[\u0027config_warnings\u0027]"},{"line_number":600,"context_line":"    is_valid \u003d len(results[\u0027config_errors\u0027]) \u003d\u003d 0"},{"line_number":601,"context_line":"    if is_valid and (conf.fatal_warnings and warnings):"},{"line_number":602,"context_line":"        sys.exit(3)"},{"line_number":603,"context_line":""}],"source_content_type":"text/x-python","patch_set":48,"id":"ffe62b97_8edbaeeb","line":600,"in_reply_to":"ffe62b97_dbf9bd80","updated":"2017-03-27 17:34:41.000000000","message":"Done","commit_id":"c9b4acaf1933aa9b436252ac50498fcd5332c4b0"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"5c88a88c008bd71354d561ad80c25c44aa63c545","unresolved":false,"context_lines":[{"line_number":598,"context_line":""},{"line_number":599,"context_line":"    warnings \u003d results[\u0027config_warnings\u0027]"},{"line_number":600,"context_line":"    is_valid \u003d len(results[\u0027config_errors\u0027]) \u003d\u003d 0"},{"line_number":601,"context_line":"    if is_valid and (conf.fatal_warnings and warnings):"},{"line_number":602,"context_line":"        sys.exit(3)"},{"line_number":603,"context_line":""},{"line_number":604,"context_line":"    raise SystemExit(not is_valid)"}],"source_content_type":"text/x-python","patch_set":48,"id":"ffe62b97_3b19c9d6","line":601,"updated":"2017-03-24 20:49:25.000000000","message":".\n\n  if not errors and ...","commit_id":"c9b4acaf1933aa9b436252ac50498fcd5332c4b0"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"de11bfda72ecdce515fad9795a8a9b12573fc0be","unresolved":false,"context_lines":[{"line_number":598,"context_line":""},{"line_number":599,"context_line":"    warnings \u003d results[\u0027config_warnings\u0027]"},{"line_number":600,"context_line":"    is_valid \u003d len(results[\u0027config_errors\u0027]) \u003d\u003d 0"},{"line_number":601,"context_line":"    if is_valid and (conf.fatal_warnings and warnings):"},{"line_number":602,"context_line":"        sys.exit(3)"},{"line_number":603,"context_line":""},{"line_number":604,"context_line":"    raise SystemExit(not is_valid)"}],"source_content_type":"text/x-python","patch_set":48,"id":"ffe62b97_6ed62ac6","line":601,"in_reply_to":"ffe62b97_3b19c9d6","updated":"2017-03-27 17:34:41.000000000","message":"Done","commit_id":"c9b4acaf1933aa9b436252ac50498fcd5332c4b0"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"5c88a88c008bd71354d561ad80c25c44aa63c545","unresolved":false,"context_lines":[{"line_number":601,"context_line":"    if is_valid and (conf.fatal_warnings and warnings):"},{"line_number":602,"context_line":"        sys.exit(3)"},{"line_number":603,"context_line":""},{"line_number":604,"context_line":"    raise SystemExit(not is_valid)"},{"line_number":605,"context_line":""},{"line_number":606,"context_line":""},{"line_number":607,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"}],"source_content_type":"text/x-python","patch_set":48,"id":"ffe62b97_db3e5d28","line":604,"updated":"2017-03-24 20:49:25.000000000","message":".\n\n  return SystemExit(bool(errors))","commit_id":"c9b4acaf1933aa9b436252ac50498fcd5332c4b0"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"de11bfda72ecdce515fad9795a8a9b12573fc0be","unresolved":false,"context_lines":[{"line_number":601,"context_line":"    if is_valid and (conf.fatal_warnings and warnings):"},{"line_number":602,"context_line":"        sys.exit(3)"},{"line_number":603,"context_line":""},{"line_number":604,"context_line":"    raise SystemExit(not is_valid)"},{"line_number":605,"context_line":""},{"line_number":606,"context_line":""},{"line_number":607,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"}],"source_content_type":"text/x-python","patch_set":48,"id":"ffe62b97_8e04ce4b","line":604,"in_reply_to":"ffe62b97_db3e5d28","updated":"2017-03-27 17:34:41.000000000","message":"Done","commit_id":"c9b4acaf1933aa9b436252ac50498fcd5332c4b0"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"5c88a88c008bd71354d561ad80c25c44aa63c545","unresolved":false,"context_lines":[{"line_number":604,"context_line":"    raise SystemExit(not is_valid)"},{"line_number":605,"context_line":""},{"line_number":606,"context_line":""},{"line_number":607,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"},{"line_number":608,"context_line":"    main()"}],"source_content_type":"text/x-python","patch_set":48,"id":"ffe62b97_bb527966","line":607,"updated":"2017-03-24 20:49:25.000000000","message":"Is the module ever executed directly, or can this be dropped?","commit_id":"c9b4acaf1933aa9b436252ac50498fcd5332c4b0"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"de11bfda72ecdce515fad9795a8a9b12573fc0be","unresolved":false,"context_lines":[{"line_number":604,"context_line":"    raise SystemExit(not is_valid)"},{"line_number":605,"context_line":""},{"line_number":606,"context_line":""},{"line_number":607,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"},{"line_number":608,"context_line":"    main()"}],"source_content_type":"text/x-python","patch_set":48,"id":"ffe62b97_ae8672da","line":607,"in_reply_to":"ffe62b97_bb527966","updated":"2017-03-27 17:34:41.000000000","message":"Yes, direct execution is one of the intended uses, specifically for subprojects that won\u0027t get an integration script.","commit_id":"c9b4acaf1933aa9b436252ac50498fcd5332c4b0"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"7819643ad09ff2a886dc421cfab0736cd69fe13e","unresolved":false,"context_lines":[{"line_number":58,"context_line":"                help\u003d\u0027Do not print a report, return code only\u0027),"},{"line_number":59,"context_line":"    cfg.StrOpt(\u0027input-file\u0027,"},{"line_number":60,"context_line":"               required\u003dTrue,"},{"line_number":61,"context_line":"               help\u003d\u0027Configuration file to validate\u0027),"},{"line_number":62,"context_line":"]"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"# Limit for the string distance when spellchecking using the"}],"source_content_type":"text/x-python","patch_set":49,"id":"ffe62b97_f8cc126b","line":61,"updated":"2017-03-28 14:56:34.000000000","message":"So, it turns out that positionals aren\u0027t quite being handled correctly by oslo_config.cfg\n\nI had to make these changes to make positional\u003dTrue work for a required argument:\n\n  http://cdn.pasteraw.com/luhzytktv75uxz8qfrxgpi8bnw9v4st\n\nWithout them, two things were happening that were preventing positional\u003dTrue from working correctly. Firstly, the option was being passed to argparse with nargs\u003d\u0027?\u0027, which made it an optional argument, despite required\u003dTrue in oslo.config (L60 here). Secondly, it was being validated as required in oslo.config despite being positional in argparse, which by default, is required and validated by argparse already. Probably worth filing a bug to get that fixed separately, and then we can base your patch on top of it today. If the diff above works for you (I only played with it a bit), poke me in IRC today (dolphm) and we can work out next steps.","commit_id":"a09ea5d62fd907a905226f8a9d7bd6a214d36eb0"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"b3d4c432f322e4ec182c86a35aede935a3154a36","unresolved":false,"context_lines":[{"line_number":58,"context_line":"                help\u003d\u0027Do not print a report, return code only\u0027),"},{"line_number":59,"context_line":"    cfg.StrOpt(\u0027input-file\u0027,"},{"line_number":60,"context_line":"               required\u003dTrue,"},{"line_number":61,"context_line":"               help\u003d\u0027Configuration file to validate\u0027),"},{"line_number":62,"context_line":"]"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"# Limit for the string distance when spellchecking using the"}],"source_content_type":"text/x-python","patch_set":49,"id":"ffe62b97_ac305357","line":61,"in_reply_to":"ffe62b97_b0c456f6","updated":"2017-03-29 15:58:26.000000000","message":"Done","commit_id":"a09ea5d62fd907a905226f8a9d7bd6a214d36eb0"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"6f6a76c114e4b550906a5cc9534f8b31585901d5","unresolved":false,"context_lines":[{"line_number":58,"context_line":"                help\u003d\u0027Do not print a report, return code only\u0027),"},{"line_number":59,"context_line":"    cfg.StrOpt(\u0027input-file\u0027,"},{"line_number":60,"context_line":"               required\u003dTrue,"},{"line_number":61,"context_line":"               help\u003d\u0027Configuration file to validate\u0027),"},{"line_number":62,"context_line":"]"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"# Limit for the string distance when spellchecking using the"}],"source_content_type":"text/x-python","patch_set":49,"id":"ffe62b97_b0c456f6","line":61,"in_reply_to":"ffe62b97_f8cc126b","updated":"2017-03-28 18:44:45.000000000","message":"So far, I haven\u0027t found an elegant solution to this, but oslo_config.cfg doesn\u0027t handle the difference between option names and destinations properly, at least in the case of positional arguments. So, if you change this option name to match the destination, then you can workaround the issue. Otherwise, \"input-file\" will appear in the argument namespace, while the required option check is checking to ensure that \"input_file\" is populated.\n\nSo, quick fix on this end. If there\u0027s ever a solution in oslo_config.cfg for this behavior, then you can change L59 back to input-file and it at least won\u0027t change the command\u0027s API (it\u0027s still just a positional argument).","commit_id":"a09ea5d62fd907a905226f8a9d7bd6a214d36eb0"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"6f6a76c114e4b550906a5cc9534f8b31585901d5","unresolved":false,"context_lines":[{"line_number":585,"context_line":"    return validation_report"},{"line_number":586,"context_line":""},{"line_number":587,"context_line":""},{"line_number":588,"context_line":"def main(args\u003dNone):"},{"line_number":589,"context_line":"    \"\"\"The main function of oslo-config-validator.\"\"\""},{"line_number":590,"context_line":"    version \u003d pkg_resources.get_distribution(\u0027oslo.config\u0027).version"},{"line_number":591,"context_line":"    logging.basicConfig(level\u003dlogging.INFO)"}],"source_content_type":"text/x-python","patch_set":49,"id":"ffe62b97_cb4e0b6e","line":588,"updated":"2017-03-28 18:44:45.000000000","message":"Are these args ever used? If not... see L594.","commit_id":"a09ea5d62fd907a905226f8a9d7bd6a214d36eb0"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"b3d4c432f322e4ec182c86a35aede935a3154a36","unresolved":false,"context_lines":[{"line_number":585,"context_line":"    return validation_report"},{"line_number":586,"context_line":""},{"line_number":587,"context_line":""},{"line_number":588,"context_line":"def main(args\u003dNone):"},{"line_number":589,"context_line":"    \"\"\"The main function of oslo-config-validator.\"\"\""},{"line_number":590,"context_line":"    version \u003d pkg_resources.get_distribution(\u0027oslo.config\u0027).version"},{"line_number":591,"context_line":"    logging.basicConfig(level\u003dlogging.INFO)"}],"source_content_type":"text/x-python","patch_set":49,"id":"ffe62b97_ec6f7b25","line":588,"in_reply_to":"ffe62b97_cb4e0b6e","updated":"2017-03-29 15:58:26.000000000","message":"Done","commit_id":"a09ea5d62fd907a905226f8a9d7bd6a214d36eb0"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"6f6a76c114e4b550906a5cc9534f8b31585901d5","unresolved":false,"context_lines":[{"line_number":591,"context_line":"    logging.basicConfig(level\u003dlogging.INFO)"},{"line_number":592,"context_line":"    conf \u003d cfg.ConfigOpts()"},{"line_number":593,"context_line":"    register_cli_opts(conf)"},{"line_number":594,"context_line":"    conf(args, version\u003dversion)"},{"line_number":595,"context_line":"    results \u003d validate(conf.input_file,"},{"line_number":596,"context_line":"                       _list_opts(conf.namespace),"},{"line_number":597,"context_line":"                       conf.ignore_sections)"}],"source_content_type":"text/x-python","patch_set":49,"id":"ffe62b97_cb772ba0","line":594,"updated":"2017-03-28 18:44:45.000000000","message":"... if not, it might be simpler to just use sys.argv[1:] in place of args here?","commit_id":"a09ea5d62fd907a905226f8a9d7bd6a214d36eb0"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"b3d4c432f322e4ec182c86a35aede935a3154a36","unresolved":false,"context_lines":[{"line_number":591,"context_line":"    logging.basicConfig(level\u003dlogging.INFO)"},{"line_number":592,"context_line":"    conf \u003d cfg.ConfigOpts()"},{"line_number":593,"context_line":"    register_cli_opts(conf)"},{"line_number":594,"context_line":"    conf(args, version\u003dversion)"},{"line_number":595,"context_line":"    results \u003d validate(conf.input_file,"},{"line_number":596,"context_line":"                       _list_opts(conf.namespace),"},{"line_number":597,"context_line":"                       conf.ignore_sections)"}],"source_content_type":"text/x-python","patch_set":49,"id":"ffe62b97_cc64b74c","line":594,"in_reply_to":"ffe62b97_cb772ba0","updated":"2017-03-29 15:58:26.000000000","message":"Done","commit_id":"a09ea5d62fd907a905226f8a9d7bd6a214d36eb0"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"7819643ad09ff2a886dc421cfab0736cd69fe13e","unresolved":false,"context_lines":[{"line_number":594,"context_line":"    conf(args, version\u003dversion)"},{"line_number":595,"context_line":"    results \u003d validate(conf.input_file,"},{"line_number":596,"context_line":"                       _list_opts(conf.namespace),"},{"line_number":597,"context_line":"                       conf.ignore_sections)"},{"line_number":598,"context_line":"    if not conf.silent:"},{"line_number":599,"context_line":"        print(report(results))"},{"line_number":600,"context_line":""}],"source_content_type":"text/x-python","patch_set":49,"id":"ffe62b97_380b9a7d","line":597,"updated":"2017-03-28 14:56:34.000000000","message":"I received the following backtrace here, I *believe* because I was trying to validate a config file for a project I didn\u0027t have installed into the local venv. I\u0027d suggest adding a try/except and bailing with a message explaining that you can\u0027t validate namespaces that can\u0027t be loaded? (if i\u0027m understanding the traceback correctly)","commit_id":"a09ea5d62fd907a905226f8a9d7bd6a214d36eb0"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"6022f56faf71c72cea66af9bc9a799512186d04f","unresolved":false,"context_lines":[{"line_number":594,"context_line":"    conf(args, version\u003dversion)"},{"line_number":595,"context_line":"    results \u003d validate(conf.input_file,"},{"line_number":596,"context_line":"                       _list_opts(conf.namespace),"},{"line_number":597,"context_line":"                       conf.ignore_sections)"},{"line_number":598,"context_line":"    if not conf.silent:"},{"line_number":599,"context_line":"        print(report(results))"},{"line_number":600,"context_line":""}],"source_content_type":"text/x-python","patch_set":49,"id":"ffe62b97_1aa1e646","line":597,"in_reply_to":"ffe62b97_0423cb57","updated":"2017-03-28 16:40:58.000000000","message":"Ah, I\u0027ll keep poking, then.","commit_id":"a09ea5d62fd907a905226f8a9d7bd6a214d36eb0"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"d44eae87c0960c1d4a007be9819f761378281b31","unresolved":false,"context_lines":[{"line_number":594,"context_line":"    conf(args, version\u003dversion)"},{"line_number":595,"context_line":"    results \u003d validate(conf.input_file,"},{"line_number":596,"context_line":"                       _list_opts(conf.namespace),"},{"line_number":597,"context_line":"                       conf.ignore_sections)"},{"line_number":598,"context_line":"    if not conf.silent:"},{"line_number":599,"context_line":"        print(report(results))"},{"line_number":600,"context_line":""}],"source_content_type":"text/x-python","patch_set":49,"id":"ffe62b97_6b9caabf","line":597,"in_reply_to":"ffe62b97_380b9a7d","updated":"2017-03-28 15:04:41.000000000","message":"http://cdn.pasteraw.com/y99gsuo0hk09egsg99i37oxx7exs02","commit_id":"a09ea5d62fd907a905226f8a9d7bd6a214d36eb0"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"2ee63adec704a4087192866e1090a5488ff52e30","unresolved":false,"context_lines":[{"line_number":594,"context_line":"    conf(args, version\u003dversion)"},{"line_number":595,"context_line":"    results \u003d validate(conf.input_file,"},{"line_number":596,"context_line":"                       _list_opts(conf.namespace),"},{"line_number":597,"context_line":"                       conf.ignore_sections)"},{"line_number":598,"context_line":"    if not conf.silent:"},{"line_number":599,"context_line":"        print(report(results))"},{"line_number":600,"context_line":""}],"source_content_type":"text/x-python","patch_set":49,"id":"ffe62b97_0423cb57","line":597,"in_reply_to":"ffe62b97_6b9caabf","updated":"2017-03-28 15:59:16.000000000","message":"I get this error too after applying your patch, but everything\u0027s installed correctly here. I think it\u0027s the positional bug.","commit_id":"a09ea5d62fd907a905226f8a9d7bd6a214d36eb0"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"6f6a76c114e4b550906a5cc9534f8b31585901d5","unresolved":false,"context_lines":[{"line_number":607,"context_line":""},{"line_number":608,"context_line":""},{"line_number":609,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"},{"line_number":610,"context_line":"    main()"}],"source_content_type":"text/x-python","patch_set":49,"id":"ffe62b97_8b06c31b","line":610,"updated":"2017-03-28 18:44:45.000000000","message":"Following up from a previous review, this can, in fact, be dropped AFAICT.  The only time this will be invoked is if you run\n\n  $ python -m oslo_config.validator ~/path/to/input-file.conf\n\nBut instead you have a real CLI entrypoint registered via setup.cfg:\n\n  $ oslo-config-validator ~/path/to/input-file.conf\n\nwhich calls straight into main(), without any arguments.","commit_id":"a09ea5d62fd907a905226f8a9d7bd6a214d36eb0"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"b3d4c432f322e4ec182c86a35aede935a3154a36","unresolved":false,"context_lines":[{"line_number":607,"context_line":""},{"line_number":608,"context_line":""},{"line_number":609,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"},{"line_number":610,"context_line":"    main()"}],"source_content_type":"text/x-python","patch_set":49,"id":"ffe62b97_0c4e1fc0","line":610,"in_reply_to":"ffe62b97_8b06c31b","updated":"2017-03-29 15:58:26.000000000","message":"Ah yes, my mistake. Thanks.","commit_id":"a09ea5d62fd907a905226f8a9d7bd6a214d36eb0"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"acbeac75069905466fc3d91367794be9770b7758","unresolved":false,"context_lines":[{"line_number":27,"context_line":"import pylev"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"from oslo_config import cfg"},{"line_number":30,"context_line":"from oslo_config.generator import _get_groups"},{"line_number":31,"context_line":"from oslo_config.generator import _list_opts"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""}],"source_content_type":"text/x-python","patch_set":52,"id":"bff0334d_e6c5285d","line":30,"updated":"2017-04-05 20:47:46.000000000","message":"It would be better to import the generator module and then access the functions through it. That\u0027s more consistent with our coding style elsewhere, where we try to import modules to ensure mocking works as expected and to show where remote functions come from.","commit_id":"890351681e3144a5ff6af10de1a6c53e8f4e9e4b"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"760f228962ecb49ad25ab4af90646d774186cdba","unresolved":false,"context_lines":[{"line_number":27,"context_line":"import pylev"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"from oslo_config import cfg"},{"line_number":30,"context_line":"from oslo_config.generator import _get_groups"},{"line_number":31,"context_line":"from oslo_config.generator import _list_opts"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""}],"source_content_type":"text/x-python","patch_set":52,"id":"bff0334d_acbfd3ce","line":30,"in_reply_to":"bff0334d_e6c5285d","updated":"2017-04-06 20:27:03.000000000","message":"Done","commit_id":"890351681e3144a5ff6af10de1a6c53e8f4e9e4b"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"acbeac75069905466fc3d91367794be9770b7758","unresolved":false,"context_lines":[{"line_number":410,"context_line":"        # create and add the \"orphan\" option errors to the results dict"},{"line_number":411,"context_line":"        _set_option_orphan_errors(option_leftover_orphans, results)"},{"line_number":412,"context_line":""},{"line_number":413,"context_line":"    for valid_section, valid_options in namespace_opts.items():"},{"line_number":414,"context_line":"        if valid_section in input_config.keys():"},{"line_number":415,"context_line":"            opts_to_be_validated \u003d input_config[valid_section]"},{"line_number":416,"context_line":"            for valid_name, valid_option in valid_options.items():"}],"source_content_type":"text/x-python","patch_set":52,"id":"bff0334d_46da94e9","line":413,"updated":"2017-04-05 20:47:46.000000000","message":"This section seems to be doing a lot of validation here, instead of relying on the logic already built into the option classes. The type classes are used, but this does things like look at the list of choices directly.\n\nAn alternate approach is to register all of the options on the ConfigOpt where the input file has been parsed, and then try to access the values of the options using getattr. That should trigger any exceptions processing the values found in the file (or missing from the file), and then those can be trapped and reported. Did you rule that approach out already?","commit_id":"890351681e3144a5ff6af10de1a6c53e8f4e9e4b"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"65af8641bc73c4e1dd0d0c3888409a9bc695ec42","unresolved":false,"context_lines":[{"line_number":410,"context_line":"        # create and add the \"orphan\" option errors to the results dict"},{"line_number":411,"context_line":"        _set_option_orphan_errors(option_leftover_orphans, results)"},{"line_number":412,"context_line":""},{"line_number":413,"context_line":"    for valid_section, valid_options in namespace_opts.items():"},{"line_number":414,"context_line":"        if valid_section in input_config.keys():"},{"line_number":415,"context_line":"            opts_to_be_validated \u003d input_config[valid_section]"},{"line_number":416,"context_line":"            for valid_name, valid_option in valid_options.items():"}],"source_content_type":"text/x-python","patch_set":52,"id":"bff0334d_f14cd942","line":413,"in_reply_to":"bff0334d_46da94e9","updated":"2017-04-12 20:36:04.000000000","message":"Done","commit_id":"890351681e3144a5ff6af10de1a6c53e8f4e9e4b"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"760f228962ecb49ad25ab4af90646d774186cdba","unresolved":false,"context_lines":[{"line_number":410,"context_line":"        # create and add the \"orphan\" option errors to the results dict"},{"line_number":411,"context_line":"        _set_option_orphan_errors(option_leftover_orphans, results)"},{"line_number":412,"context_line":""},{"line_number":413,"context_line":"    for valid_section, valid_options in namespace_opts.items():"},{"line_number":414,"context_line":"        if valid_section in input_config.keys():"},{"line_number":415,"context_line":"            opts_to_be_validated \u003d input_config[valid_section]"},{"line_number":416,"context_line":"            for valid_name, valid_option in valid_options.items():"}],"source_content_type":"text/x-python","patch_set":52,"id":"bff0334d_071d7865","line":413,"in_reply_to":"bff0334d_46da94e9","updated":"2017-04-06 20:27:03.000000000","message":"I never considered that as an approach. Would it be more readable/maintainable? Can you give a small example of how that might look in practice?","commit_id":"890351681e3144a5ff6af10de1a6c53e8f4e9e4b"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"acbeac75069905466fc3d91367794be9770b7758","unresolved":false,"context_lines":[{"line_number":485,"context_line":"    :rtype: tuple containing boolean config_is_valid, results dict"},{"line_number":486,"context_line":"    \"\"\""},{"line_number":487,"context_line":"    conf \u003d cfg.ConfigOpts()"},{"line_number":488,"context_line":"    conf.register_opts(_validator_opts)"},{"line_number":489,"context_line":""},{"line_number":490,"context_line":"    return _validate(input_file, namespace_config, ignore_sections)"},{"line_number":491,"context_line":""}],"source_content_type":"text/x-python","patch_set":52,"id":"bff0334d_a6bcc0bb","line":488,"updated":"2017-04-05 20:47:46.000000000","message":"This conf object isn\u0027t otherwise used. Is this function relying on register_opts() to throw an exception in some case that isn\u0027t being tested here in this module? If so, a comment would help ensure someone doesn\u0027t clean up a call that looks like it\u0027s not used.","commit_id":"890351681e3144a5ff6af10de1a6c53e8f4e9e4b"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"760f228962ecb49ad25ab4af90646d774186cdba","unresolved":false,"context_lines":[{"line_number":485,"context_line":"    :rtype: tuple containing boolean config_is_valid, results dict"},{"line_number":486,"context_line":"    \"\"\""},{"line_number":487,"context_line":"    conf \u003d cfg.ConfigOpts()"},{"line_number":488,"context_line":"    conf.register_opts(_validator_opts)"},{"line_number":489,"context_line":""},{"line_number":490,"context_line":"    return _validate(input_file, namespace_config, ignore_sections)"},{"line_number":491,"context_line":""}],"source_content_type":"text/x-python","patch_set":52,"id":"bff0334d_cc79f7fc","line":488,"in_reply_to":"bff0334d_a6bcc0bb","updated":"2017-04-06 20:27:03.000000000","message":"Good catch, removed.","commit_id":"890351681e3144a5ff6af10de1a6c53e8f4e9e4b"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"acbeac75069905466fc3d91367794be9770b7758","unresolved":false,"context_lines":[{"line_number":513,"context_line":"        self.option_value \u003d option_value"},{"line_number":514,"context_line":"        self.data \u003d data"},{"line_number":515,"context_line":""},{"line_number":516,"context_line":"    def __str__(self):"},{"line_number":517,"context_line":"        if self.message_type \u003d\u003d \u0027repetition\u0027:"},{"line_number":518,"context_line":"            return (\u0027{} option \"{}\" is unnecessarily configured with the \u0027"},{"line_number":519,"context_line":"                    \u0027default value \"{}\"\u0027.format(self.config_section,"}],"source_content_type":"text/x-python","patch_set":52,"id":"bff0334d_a63280a6","line":516,"updated":"2017-04-05 20:47:46.000000000","message":"Aw, this is what subclasses are *for*.","commit_id":"890351681e3144a5ff6af10de1a6c53e8f4e9e4b"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"65af8641bc73c4e1dd0d0c3888409a9bc695ec42","unresolved":false,"context_lines":[{"line_number":513,"context_line":"        self.option_value \u003d option_value"},{"line_number":514,"context_line":"        self.data \u003d data"},{"line_number":515,"context_line":""},{"line_number":516,"context_line":"    def __str__(self):"},{"line_number":517,"context_line":"        if self.message_type \u003d\u003d \u0027repetition\u0027:"},{"line_number":518,"context_line":"            return (\u0027{} option \"{}\" is unnecessarily configured with the \u0027"},{"line_number":519,"context_line":"                    \u0027default value \"{}\"\u0027.format(self.config_section,"}],"source_content_type":"text/x-python","patch_set":52,"id":"bff0334d_716209b0","line":516,"in_reply_to":"bff0334d_a63280a6","updated":"2017-04-12 20:36:04.000000000","message":"Done","commit_id":"890351681e3144a5ff6af10de1a6c53e8f4e9e4b"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"760f228962ecb49ad25ab4af90646d774186cdba","unresolved":false,"context_lines":[{"line_number":513,"context_line":"        self.option_value \u003d option_value"},{"line_number":514,"context_line":"        self.data \u003d data"},{"line_number":515,"context_line":""},{"line_number":516,"context_line":"    def __str__(self):"},{"line_number":517,"context_line":"        if self.message_type \u003d\u003d \u0027repetition\u0027:"},{"line_number":518,"context_line":"            return (\u0027{} option \"{}\" is unnecessarily configured with the \u0027"},{"line_number":519,"context_line":"                    \u0027default value \"{}\"\u0027.format(self.config_section,"}],"source_content_type":"text/x-python","patch_set":52,"id":"bff0334d_8c9f6f02","line":516,"in_reply_to":"bff0334d_a63280a6","updated":"2017-04-06 20:27:03.000000000","message":"I know, I was just going for fewer classes/less code here, it\u0027s already 600 lines. If you really want me to do this as a bunch of subclasses, I will. Please advise.","commit_id":"890351681e3144a5ff6af10de1a6c53e8f4e9e4b"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"acbeac75069905466fc3d91367794be9770b7758","unresolved":false,"context_lines":[{"line_number":603,"context_line":"    if not errors and (conf.fatal_warnings and warnings):"},{"line_number":604,"context_line":"        sys.exit(3)"},{"line_number":605,"context_line":""},{"line_number":606,"context_line":"    return SystemExit(bool(errors))"}],"source_content_type":"text/x-python","patch_set":52,"id":"bff0334d_c6bb44e3","line":606,"updated":"2017-04-05 20:47:46.000000000","message":"I haven\u0027t seen this pattern before. Does returning the exception work differently from just returning the integer exit code?","commit_id":"890351681e3144a5ff6af10de1a6c53e8f4e9e4b"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"760f228962ecb49ad25ab4af90646d774186cdba","unresolved":false,"context_lines":[{"line_number":603,"context_line":"    if not errors and (conf.fatal_warnings and warnings):"},{"line_number":604,"context_line":"        sys.exit(3)"},{"line_number":605,"context_line":""},{"line_number":606,"context_line":"    return SystemExit(bool(errors))"}],"source_content_type":"text/x-python","patch_set":52,"id":"bff0334d_4c25e7c1","line":606,"in_reply_to":"bff0334d_c6bb44e3","updated":"2017-04-06 20:27:03.000000000","message":"I\u0027m 90% sure it\u0027s a matter of taste except in some edge cases I can\u0027t enumerate, it\u0027s this way now to comply with Dolphs reviews.","commit_id":"890351681e3144a5ff6af10de1a6c53e8f4e9e4b"},{"author":{"_account_id":9796,"name":"ChangBo Guo","email":"glongwave@gmail.com","username":"gcb"},"change_message_id":"beb3a498564acb6e3ef5955a676eb071d86032fe","unresolved":false,"context_lines":[{"line_number":18,"context_line":".. versionadded:: 3.22"},{"line_number":19,"context_line":"\"\"\""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"import abc"},{"line_number":22,"context_line":"import itertools"},{"line_number":23,"context_line":"import logging"},{"line_number":24,"context_line":"import os"},{"line_number":25,"context_line":"import pkg_resources"},{"line_number":26,"context_line":"import sys"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"import pylev"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"from oslo_config import cfg"},{"line_number":31,"context_line":"from oslo_config import generator"},{"line_number":32,"context_line":"import six"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"LOG \u003d logging.getLogger(__name__)"}],"source_content_type":"text/x-python","patch_set":55,"id":"3f044301_68ba01df","line":32,"range":{"start_line":21,"start_character":0,"end_line":32,"end_character":10},"updated":"2017-05-04 11:36:31.000000000","message":"Please ollow the order in https://docs.openstack.org/developer/hacking/#import-order-template","commit_id":"a654beb1d4dd1473bf1bb886d3665e81fc51a9bd"},{"author":{"_account_id":9796,"name":"ChangBo Guo","email":"glongwave@gmail.com","username":"gcb"},"change_message_id":"a96df4bf2849f2281e8f7a5e1fa7c319a501d2a9","unresolved":false,"context_lines":[{"line_number":18,"context_line":".. versionadded:: 3.22"},{"line_number":19,"context_line":"\"\"\""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"import abc"},{"line_number":22,"context_line":"import itertools"},{"line_number":23,"context_line":"import logging"},{"line_number":24,"context_line":"import os"},{"line_number":25,"context_line":"import pkg_resources"},{"line_number":26,"context_line":"import sys"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"import pylev"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"from oslo_config import cfg"},{"line_number":31,"context_line":"from oslo_config import generator"},{"line_number":32,"context_line":"import six"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"LOG \u003d logging.getLogger(__name__)"}],"source_content_type":"text/x-python","patch_set":55,"id":"3f044301_411942d5","line":32,"range":{"start_line":21,"start_character":0,"end_line":32,"end_character":10},"in_reply_to":"3f044301_68ba01df","updated":"2017-05-05 07:39:09.000000000","message":"Done","commit_id":"a654beb1d4dd1473bf1bb886d3665e81fc51a9bd"},{"author":{"_account_id":9796,"name":"ChangBo Guo","email":"glongwave@gmail.com","username":"gcb"},"change_message_id":"beb3a498564acb6e3ef5955a676eb071d86032fe","unresolved":false,"context_lines":[{"line_number":36,"context_line":""},{"line_number":37,"context_line":"_validator_opts \u003d ["},{"line_number":38,"context_line":"    cfg.MultiStrOpt(\u0027namespace\u0027,"},{"line_number":39,"context_line":"                    required\u003dFalse,"},{"line_number":40,"context_line":"                    help\u003d\u0027Option namespace under \"oslo.config.opts\" in which \u0027"},{"line_number":41,"context_line":"                         \u0027to query for options.\u0027),"},{"line_number":42,"context_line":"    cfg.MultiStrOpt(\u0027ignore-sections\u0027,"}],"source_content_type":"text/x-python","patch_set":55,"id":"3f044301_48e62519","line":39,"range":{"start_line":39,"start_character":0,"end_line":39,"end_character":35},"updated":"2017-05-04 11:36:31.000000000","message":"Parameter required\u0027s default value is False, need remove all of \u0027required\u003dFalse\u0027.","commit_id":"a654beb1d4dd1473bf1bb886d3665e81fc51a9bd"},{"author":{"_account_id":9796,"name":"ChangBo Guo","email":"glongwave@gmail.com","username":"gcb"},"change_message_id":"a96df4bf2849f2281e8f7a5e1fa7c319a501d2a9","unresolved":false,"context_lines":[{"line_number":36,"context_line":""},{"line_number":37,"context_line":"_validator_opts \u003d ["},{"line_number":38,"context_line":"    cfg.MultiStrOpt(\u0027namespace\u0027,"},{"line_number":39,"context_line":"                    required\u003dFalse,"},{"line_number":40,"context_line":"                    help\u003d\u0027Option namespace under \"oslo.config.opts\" in which \u0027"},{"line_number":41,"context_line":"                         \u0027to query for options.\u0027),"},{"line_number":42,"context_line":"    cfg.MultiStrOpt(\u0027ignore-sections\u0027,"}],"source_content_type":"text/x-python","patch_set":55,"id":"3f044301_417ee2e4","line":39,"range":{"start_line":39,"start_character":0,"end_line":39,"end_character":35},"in_reply_to":"3f044301_48e62519","updated":"2017-05-05 07:39:09.000000000","message":"Done","commit_id":"a654beb1d4dd1473bf1bb886d3665e81fc51a9bd"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"5e693a247f76d84a3679abeafb082e1eb5cdf666","unresolved":false,"context_lines":[{"line_number":53,"context_line":"                help\u003d\u0027Do not print a report, return code only\u0027),"},{"line_number":54,"context_line":"    cfg.StrOpt(\u0027input-file\u0027,"},{"line_number":55,"context_line":"               required\u003dTrue,"},{"line_number":56,"context_line":"               help\u003d\u0027Configuration file to validate\u0027),"},{"line_number":57,"context_line":"]"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"# Limit for the string distance when spellchecking using the"}],"source_content_type":"text/x-python","patch_set":56,"id":"ff0f0b1f_ded387d4","line":56,"updated":"2017-05-22 20:00:58.000000000","message":"We\u0027re going to have to rework this after https://review.openstack.org/#/c/454897/ is done.","commit_id":"837e7e32dac43e2b16fdd7bcf4d964f82f2e10e6"},{"author":{"_account_id":9796,"name":"ChangBo Guo","email":"glongwave@gmail.com","username":"gcb"},"change_message_id":"b6fb3df3f9aca80a362c7025a7667fd8792e7319","unresolved":false,"context_lines":[{"line_number":53,"context_line":"                help\u003d\u0027Do not print a report, return code only\u0027),"},{"line_number":54,"context_line":"    cfg.StrOpt(\u0027input-file\u0027,"},{"line_number":55,"context_line":"               required\u003dTrue,"},{"line_number":56,"context_line":"               help\u003d\u0027Configuration file to validate\u0027),"},{"line_number":57,"context_line":"]"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"# Limit for the string distance when spellchecking using the"}],"source_content_type":"text/x-python","patch_set":56,"id":"ff0f0b1f_b163e4b1","line":56,"in_reply_to":"ff0f0b1f_ded387d4","updated":"2017-05-26 09:30:59.000000000","message":"++","commit_id":"837e7e32dac43e2b16fdd7bcf4d964f82f2e10e6"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"5e693a247f76d84a3679abeafb082e1eb5cdf666","unresolved":false,"context_lines":[{"line_number":175,"context_line":"    # {\u0027section1\u0027: frozenset([\u0027option1\u0027, ...]), ...}"},{"line_number":176,"context_line":"    # These frozensets are used to prevent unintentionally altering the content"},{"line_number":177,"context_line":"    # and allow us to perform the necessary set math operatons later"},{"line_number":178,"context_line":"    valid_config_lookup \u003d {section: frozenset(list(itertools.chain(values)))"},{"line_number":179,"context_line":"                           for section, values in namespace_opts.items()}"},{"line_number":180,"context_line":"    # create a dict of the users namespaces and options, structured exactly the"},{"line_number":181,"context_line":"    # same as valid_config_lookup above"}],"source_content_type":"text/x-python","patch_set":56,"id":"ff0f0b1f_3e1603aa","line":178,"updated":"2017-05-22 20:00:58.000000000","message":"I don\u0027t think we need the list() or itertools.chain() calls here?","commit_id":"837e7e32dac43e2b16fdd7bcf4d964f82f2e10e6"},{"author":{"_account_id":9796,"name":"ChangBo Guo","email":"glongwave@gmail.com","username":"gcb"},"change_message_id":"b6fb3df3f9aca80a362c7025a7667fd8792e7319","unresolved":false,"context_lines":[{"line_number":175,"context_line":"    # {\u0027section1\u0027: frozenset([\u0027option1\u0027, ...]), ...}"},{"line_number":176,"context_line":"    # These frozensets are used to prevent unintentionally altering the content"},{"line_number":177,"context_line":"    # and allow us to perform the necessary set math operatons later"},{"line_number":178,"context_line":"    valid_config_lookup \u003d {section: frozenset(list(itertools.chain(values)))"},{"line_number":179,"context_line":"                           for section, values in namespace_opts.items()}"},{"line_number":180,"context_line":"    # create a dict of the users namespaces and options, structured exactly the"},{"line_number":181,"context_line":"    # same as valid_config_lookup above"}],"source_content_type":"text/x-python","patch_set":56,"id":"ff0f0b1f_055003d4","line":178,"in_reply_to":"ff0f0b1f_3e1603aa","updated":"2017-05-26 09:30:59.000000000","message":"Done","commit_id":"837e7e32dac43e2b16fdd7bcf4d964f82f2e10e6"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"5e693a247f76d84a3679abeafb082e1eb5cdf666","unresolved":false,"context_lines":[{"line_number":178,"context_line":"    valid_config_lookup \u003d {section: frozenset(list(itertools.chain(values)))"},{"line_number":179,"context_line":"                           for section, values in namespace_opts.items()}"},{"line_number":180,"context_line":"    # create a dict of the users namespaces and options, structured exactly the"},{"line_number":181,"context_line":"    # same as valid_config_lookup above"},{"line_number":182,"context_line":"    user_section \u003d {section: frozenset(list(itertools.chain(values)))"},{"line_number":183,"context_line":"                    for section, values in input_config.items()}"},{"line_number":184,"context_line":"    # create a frozen list of the options in the section(s) the user needs to"}],"source_content_type":"text/x-python","patch_set":56,"id":"ff0f0b1f_5e8d37d1","line":181,"updated":"2017-05-22 20:00:58.000000000","message":"This is going to be harder to compute with the driver-based parsing stuff in place because it may be expensive or impossible to query some sources for \"all\" known values. The current implementation assumes 1 configuration file per service, too, which may not be a valid assumption now and is unlikely to be valid after the shift to support multiple storage backends.","commit_id":"837e7e32dac43e2b16fdd7bcf4d964f82f2e10e6"},{"author":{"_account_id":9796,"name":"ChangBo Guo","email":"glongwave@gmail.com","username":"gcb"},"change_message_id":"b6fb3df3f9aca80a362c7025a7667fd8792e7319","unresolved":false,"context_lines":[{"line_number":178,"context_line":"    valid_config_lookup \u003d {section: frozenset(list(itertools.chain(values)))"},{"line_number":179,"context_line":"                           for section, values in namespace_opts.items()}"},{"line_number":180,"context_line":"    # create a dict of the users namespaces and options, structured exactly the"},{"line_number":181,"context_line":"    # same as valid_config_lookup above"},{"line_number":182,"context_line":"    user_section \u003d {section: frozenset(list(itertools.chain(values)))"},{"line_number":183,"context_line":"                    for section, values in input_config.items()}"},{"line_number":184,"context_line":"    # create a frozen list of the options in the section(s) the user needs to"}],"source_content_type":"text/x-python","patch_set":56,"id":"ff0f0b1f_a544b775","line":181,"in_reply_to":"ff0f0b1f_5e8d37d1","updated":"2017-05-26 09:30:59.000000000","message":"we need support multiple configuration files in method validate","commit_id":"837e7e32dac43e2b16fdd7bcf4d964f82f2e10e6"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"5e693a247f76d84a3679abeafb082e1eb5cdf666","unresolved":false,"context_lines":[{"line_number":179,"context_line":"                           for section, values in namespace_opts.items()}"},{"line_number":180,"context_line":"    # create a dict of the users namespaces and options, structured exactly the"},{"line_number":181,"context_line":"    # same as valid_config_lookup above"},{"line_number":182,"context_line":"    user_section \u003d {section: frozenset(list(itertools.chain(values)))"},{"line_number":183,"context_line":"                    for section, values in input_config.items()}"},{"line_number":184,"context_line":"    # create a frozen list of the options in the section(s) the user needs to"},{"line_number":185,"context_line":"    # ignore"}],"source_content_type":"text/x-python","patch_set":56,"id":"ff0f0b1f_fe0beb79","line":182,"updated":"2017-05-22 20:00:58.000000000","message":"I don\u0027t think we need these list() and itertools.chain() calls either.","commit_id":"837e7e32dac43e2b16fdd7bcf4d964f82f2e10e6"},{"author":{"_account_id":9796,"name":"ChangBo Guo","email":"glongwave@gmail.com","username":"gcb"},"change_message_id":"b6fb3df3f9aca80a362c7025a7667fd8792e7319","unresolved":false,"context_lines":[{"line_number":179,"context_line":"                           for section, values in namespace_opts.items()}"},{"line_number":180,"context_line":"    # create a dict of the users namespaces and options, structured exactly the"},{"line_number":181,"context_line":"    # same as valid_config_lookup above"},{"line_number":182,"context_line":"    user_section \u003d {section: frozenset(list(itertools.chain(values)))"},{"line_number":183,"context_line":"                    for section, values in input_config.items()}"},{"line_number":184,"context_line":"    # create a frozen list of the options in the section(s) the user needs to"},{"line_number":185,"context_line":"    # ignore"}],"source_content_type":"text/x-python","patch_set":56,"id":"ff0f0b1f_a50dd7e9","line":182,"in_reply_to":"ff0f0b1f_fe0beb79","updated":"2017-05-26 09:30:59.000000000","message":"Done","commit_id":"837e7e32dac43e2b16fdd7bcf4d964f82f2e10e6"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"5e693a247f76d84a3679abeafb082e1eb5cdf666","unresolved":false,"context_lines":[{"line_number":183,"context_line":"                    for section, values in input_config.items()}"},{"line_number":184,"context_line":"    # create a frozen list of the options in the section(s) the user needs to"},{"line_number":185,"context_line":"    # ignore"},{"line_number":186,"context_line":"    ignore_options \u003d frozenset(list(itertools.chain.from_iterable("},{"line_number":187,"context_line":"                               o for s, o in namespace_opts.items()"},{"line_number":188,"context_line":"                               if s in ignore_sections)))"},{"line_number":189,"context_line":""}],"source_content_type":"text/x-python","patch_set":56,"id":"ff0f0b1f_fe808bc1","line":186,"updated":"2017-05-22 20:00:58.000000000","message":"I don\u0027t think this list() call is needed.","commit_id":"837e7e32dac43e2b16fdd7bcf4d964f82f2e10e6"},{"author":{"_account_id":9796,"name":"ChangBo Guo","email":"glongwave@gmail.com","username":"gcb"},"change_message_id":"b6fb3df3f9aca80a362c7025a7667fd8792e7319","unresolved":false,"context_lines":[{"line_number":183,"context_line":"                    for section, values in input_config.items()}"},{"line_number":184,"context_line":"    # create a frozen list of the options in the section(s) the user needs to"},{"line_number":185,"context_line":"    # ignore"},{"line_number":186,"context_line":"    ignore_options \u003d frozenset(list(itertools.chain.from_iterable("},{"line_number":187,"context_line":"                               o for s, o in namespace_opts.items()"},{"line_number":188,"context_line":"                               if s in ignore_sections)))"},{"line_number":189,"context_line":""}],"source_content_type":"text/x-python","patch_set":56,"id":"ff0f0b1f_8512d308","line":186,"in_reply_to":"ff0f0b1f_fe808bc1","updated":"2017-05-26 09:30:59.000000000","message":"Done","commit_id":"837e7e32dac43e2b16fdd7bcf4d964f82f2e10e6"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"5e693a247f76d84a3679abeafb082e1eb5cdf666","unresolved":false,"context_lines":[{"line_number":203,"context_line":"        else:"},{"line_number":204,"context_line":"            user_section_options_iter \u003d frozenset(list("},{"line_number":205,"context_line":"                itertools.chain.from_iterable(user_options)))"},{"line_number":206,"context_line":"            non_ignored_orphans \u003d diff - user_section_options_iter - \\"},{"line_number":207,"context_line":"                ignore_options"},{"line_number":208,"context_line":"            orphaned_input_values.update({section: non_ignored_orphans})"},{"line_number":209,"context_line":""}],"source_content_type":"text/x-python","patch_set":56,"id":"ff0f0b1f_7ea91b22","line":206,"updated":"2017-05-22 20:00:58.000000000","message":"Use () to wrap the expression instead of \\ to escape the newline.","commit_id":"837e7e32dac43e2b16fdd7bcf4d964f82f2e10e6"},{"author":{"_account_id":9796,"name":"ChangBo Guo","email":"glongwave@gmail.com","username":"gcb"},"change_message_id":"b6fb3df3f9aca80a362c7025a7667fd8792e7319","unresolved":false,"context_lines":[{"line_number":203,"context_line":"        else:"},{"line_number":204,"context_line":"            user_section_options_iter \u003d frozenset(list("},{"line_number":205,"context_line":"                itertools.chain.from_iterable(user_options)))"},{"line_number":206,"context_line":"            non_ignored_orphans \u003d diff - user_section_options_iter - \\"},{"line_number":207,"context_line":"                ignore_options"},{"line_number":208,"context_line":"            orphaned_input_values.update({section: non_ignored_orphans})"},{"line_number":209,"context_line":""}],"source_content_type":"text/x-python","patch_set":56,"id":"ff0f0b1f_dcbaef08","line":206,"in_reply_to":"ff0f0b1f_7ea91b22","updated":"2017-05-26 09:30:59.000000000","message":"Done","commit_id":"837e7e32dac43e2b16fdd7bcf4d964f82f2e10e6"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"5e693a247f76d84a3679abeafb082e1eb5cdf666","unresolved":false,"context_lines":[{"line_number":205,"context_line":"                itertools.chain.from_iterable(user_options)))"},{"line_number":206,"context_line":"            non_ignored_orphans \u003d diff - user_section_options_iter - \\"},{"line_number":207,"context_line":"                ignore_options"},{"line_number":208,"context_line":"            orphaned_input_values.update({section: non_ignored_orphans})"},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"    suggestions \u003d {}  # possible corrected SPELLING to report for orphaned opts"},{"line_number":211,"context_line":"    rehomings \u003d {}  # possible corrected SECTIONS to report for orphaned opts"}],"source_content_type":"text/x-python","patch_set":56,"id":"ff0f0b1f_3e4e0397","line":208,"updated":"2017-05-22 20:00:58.000000000","message":"This is just \"orphaned_input_values[section] \u003d non_ignored_orphans\", right?","commit_id":"837e7e32dac43e2b16fdd7bcf4d964f82f2e10e6"},{"author":{"_account_id":9796,"name":"ChangBo Guo","email":"glongwave@gmail.com","username":"gcb"},"change_message_id":"b6fb3df3f9aca80a362c7025a7667fd8792e7319","unresolved":false,"context_lines":[{"line_number":205,"context_line":"                itertools.chain.from_iterable(user_options)))"},{"line_number":206,"context_line":"            non_ignored_orphans \u003d diff - user_section_options_iter - \\"},{"line_number":207,"context_line":"                ignore_options"},{"line_number":208,"context_line":"            orphaned_input_values.update({section: non_ignored_orphans})"},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"    suggestions \u003d {}  # possible corrected SPELLING to report for orphaned opts"},{"line_number":211,"context_line":"    rehomings \u003d {}  # possible corrected SECTIONS to report for orphaned opts"}],"source_content_type":"text/x-python","patch_set":56,"id":"ff0f0b1f_2501c7b0","line":208,"in_reply_to":"ff0f0b1f_3e4e0397","updated":"2017-05-26 09:30:59.000000000","message":"Done","commit_id":"837e7e32dac43e2b16fdd7bcf4d964f82f2e10e6"}],"test-requirements.txt":[{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"761a70462d52ac99c38bb1769f5f19bea94337e7","unresolved":false,"context_lines":[{"line_number":10,"context_line":"testscenarios\u003e\u003d0.4 # Apache-2.0/BSD"},{"line_number":11,"context_line":"testtools\u003e\u003d1.4.0 # MIT"},{"line_number":12,"context_line":"oslotest\u003e\u003d1.10.0 # Apache-2.0"},{"line_number":13,"context_line":"pylev\u003e\u003d1.3.0 # BSD"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"# when we can require tox\u003e\u003d 1.4, this can go into tox.ini:"},{"line_number":16,"context_line":"#  [testenv:cover]"}],"source_content_type":"text/plain","patch_set":44,"id":"da36d5c6_6ea6b554","line":13,"updated":"2017-02-21 18:21:33.000000000","message":"This is already in requirements.txt so shouldn\u0027t be here.","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"77c95e3a10eb1623be199bb4611830516342e648","unresolved":false,"context_lines":[{"line_number":10,"context_line":"testscenarios\u003e\u003d0.4 # Apache-2.0/BSD"},{"line_number":11,"context_line":"testtools\u003e\u003d1.4.0 # MIT"},{"line_number":12,"context_line":"oslotest\u003e\u003d1.10.0 # Apache-2.0"},{"line_number":13,"context_line":"pylev\u003e\u003d1.3.0 # BSD"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"# when we can require tox\u003e\u003d 1.4, this can go into tox.ini:"},{"line_number":16,"context_line":"#  [testenv:cover]"}],"source_content_type":"text/plain","patch_set":44,"id":"ba2be162_037e36e4","line":13,"in_reply_to":"da36d5c6_6ea6b554","updated":"2017-02-28 20:41:25.000000000","message":"Done","commit_id":"023c5c1a8fb430092839cc452ecd8deeae9aaad2"}]}
