)]}'
{"doc/source/usage.rst":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"257eb944387e34bb9ac439de7c23d623a2e91b75","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"The ``neutron_lib.hacking`` package implements a number of public `hacking checks \u003chttps://github.com/openstack-dev/hacking\u003e`_"},{"line_number":14,"context_line":"that you can use directly, or register in bulk using ``neutron_lib.hacking.checks.factory``."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"For example, to register and run all the neutron-lib hacking checks via your ``tox -e pep8``,"},{"line_number":17,"context_line":"ensure your ``tox.ini`` contains the following::"},{"line_number":18,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"3aaa91ec_09af30e4","line":15,"updated":"2016-06-28 09:14:55.000000000","message":"I found that there is also a way to register check under its code while using factory. We can either specify check code in docstring (see https://github.com/PyCQA/pycodestyle/blob/master/pycodestyle.py#L1444)\n\ndef use_jsonutils(logical_line, filename):\n    \"\"\"N521 - use jsonutils instead of json\"\"\"\n\nOr pass it to register as optional code parameter, like:\n\n def factory(register):\n     register(use_jsonutils, [\u0027N521\u0027])","commit_id":"5d3b250f07821e0acc742aa93928ea1d95fc4c61"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"b5f3dbba62a093d5ff2a56b8816573bd055c3800","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"The ``neutron_lib.hacking`` package implements a number of public `hacking checks \u003chttps://github.com/openstack-dev/hacking\u003e`_"},{"line_number":14,"context_line":"that you can use directly, or register in bulk using ``neutron_lib.hacking.checks.factory``."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"For example, to register and run all the neutron-lib hacking checks via your ``tox -e pep8``,"},{"line_number":17,"context_line":"ensure your ``tox.ini`` contains the following::"},{"line_number":18,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"3aaa91ec_f67b8679","line":15,"in_reply_to":"3aaa91ec_09af30e4","updated":"2016-06-28 15:38:18.000000000","message":"Yes thanks, but I\u0027m not seeing how your comment applies to this patch and results in a -1 review. Could you please clarify what you are asking for in here?","commit_id":"5d3b250f07821e0acc742aa93928ea1d95fc4c61"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"db36c39f0f22d75d9a2fc26b251d6fc11557dca0","unresolved":false,"context_lines":[{"line_number":23,"context_line":"Flake8 does support exposing checks via entry points, but neutron-lib does not register"},{"line_number":24,"context_line":"any of its checks in this fashion. If you need neutron_lib checks registered with the ``flake8`` CLI"},{"line_number":25,"context_line":"you\u0027ll need to `define the entry point(s) \u003chttp://flake8.pycqa.org/en/latest/plugin-development/registering-plugins.html\u003e`_"},{"line_number":26,"context_line":"yourself."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Note that consumers adopting the library in a step-wise fashion may need to ignore a subset of the"},{"line_number":29,"context_line":"checks temporarily until they implement support/compliance."}],"source_content_type":"text/x-rst","patch_set":2,"id":"3aaa91ec_96edfe90","line":26,"updated":"2016-06-28 08:15:29.000000000","message":"Hm, can\u0027t we just register them, with off_by_default applied? Then users will be able to either use factory or pick and choose without providing entry points.\n\nNote that entry points are not supposed to be duplicate in different packages, it may introduce hard to debug issues.","commit_id":"5d3b250f07821e0acc742aa93928ea1d95fc4c61"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"0914898cc519302e5b9f4e54b834517eb739c5ec","unresolved":false,"context_lines":[{"line_number":23,"context_line":"Flake8 does support exposing checks via entry points, but neutron-lib does not register"},{"line_number":24,"context_line":"any of its checks in this fashion. If you need neutron_lib checks registered with the ``flake8`` CLI"},{"line_number":25,"context_line":"you\u0027ll need to `define the entry point(s) \u003chttp://flake8.pycqa.org/en/latest/plugin-development/registering-plugins.html\u003e`_"},{"line_number":26,"context_line":"yourself."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Note that consumers adopting the library in a step-wise fashion may need to ignore a subset of the"},{"line_number":29,"context_line":"checks temporarily until they implement support/compliance."}],"source_content_type":"text/x-rst","patch_set":2,"id":"3aaa91ec_d66f6afa","line":26,"in_reply_to":"3aaa91ec_96a322b1","updated":"2016-06-28 16:00:18.000000000","message":"IMHO there\u0027s no recommendation to register as entry points here, rather it\u0027s clarifying that neutron-lib does not do any such registration and consumers can do so themselves if they want the checks avail in the flake8 CLI.\n\n\nHowever I\u0027m not adverse to removing this reference if it\u0027s confusing to the reviewers/readers.","commit_id":"5d3b250f07821e0acc742aa93928ea1d95fc4c61"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"d06a2e4680280e8aff0c1afd2345caa4996e704d","unresolved":false,"context_lines":[{"line_number":23,"context_line":"Flake8 does support exposing checks via entry points, but neutron-lib does not register"},{"line_number":24,"context_line":"any of its checks in this fashion. If you need neutron_lib checks registered with the ``flake8`` CLI"},{"line_number":25,"context_line":"you\u0027ll need to `define the entry point(s) \u003chttp://flake8.pycqa.org/en/latest/plugin-development/registering-plugins.html\u003e`_"},{"line_number":26,"context_line":"yourself."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Note that consumers adopting the library in a step-wise fashion may need to ignore a subset of the"},{"line_number":29,"context_line":"checks temporarily until they implement support/compliance."}],"source_content_type":"text/x-rst","patch_set":2,"id":"3aaa91ec_96a322b1","line":26,"in_reply_to":"3aaa91ec_96edfe90","updated":"2016-06-28 15:44:22.000000000","message":"It seems like as per latest comments from the author, we have no easy way to provide a factory in addition to entry points. In that case, maybe we should remove the recommendation to define consumer-specific entry points?","commit_id":"5d3b250f07821e0acc742aa93928ea1d95fc4c61"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"e70fb6fdfb004663ad717bc1e2a9b39e2a3f774b","unresolved":false,"context_lines":[{"line_number":23,"context_line":"Flake8 does support exposing checks via entry points, but neutron-lib does not register"},{"line_number":24,"context_line":"any of its checks in this fashion. If you need neutron_lib checks registered with the ``flake8`` CLI"},{"line_number":25,"context_line":"you\u0027ll need to `define the entry point(s) \u003chttp://flake8.pycqa.org/en/latest/plugin-development/registering-plugins.html\u003e`_"},{"line_number":26,"context_line":"yourself."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Note that consumers adopting the library in a step-wise fashion may need to ignore a subset of the"},{"line_number":29,"context_line":"checks temporarily until they implement support/compliance."}],"source_content_type":"text/x-rst","patch_set":2,"id":"3aaa91ec_bc039f75","line":26,"in_reply_to":"3aaa91ec_d66f6afa","updated":"2016-06-28 16:12:30.000000000","message":"I don\u0027t insist on removing it per se. I am just a bit concerned that people may declare duplicate checks in their namespaces and be hit by magic pbr related issues. But that\u0027s probably their problem?..","commit_id":"5d3b250f07821e0acc742aa93928ea1d95fc4c61"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"d06a2e4680280e8aff0c1afd2345caa4996e704d","unresolved":false,"context_lines":[{"line_number":25,"context_line":"you\u0027ll need to `define the entry point(s) \u003chttp://flake8.pycqa.org/en/latest/plugin-development/registering-plugins.html\u003e`_"},{"line_number":26,"context_line":"yourself."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Note that consumers adopting the library in a step-wise fashion may need to ignore a subset of the"},{"line_number":29,"context_line":"checks temporarily until they implement support/compliance."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"3aaa91ec_f6e6e6e6","line":28,"updated":"2016-06-28 15:44:22.000000000","message":"The main problem here is that if we continue promoting a factory, and we introduce new checks, a next -lib release breaks existing consumers that happen to violate the new check. How do we solve that issue with a factory? Afaik off_by_default works only for entry points, not factory registered checks. That may be seen as a limitation of flake8 itself though. Anyway, it would be worth exploring what\u0027s our strategy for the time when we want more checks in the library.","commit_id":"5d3b250f07821e0acc742aa93928ea1d95fc4c61"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"dbc07ad73ada0116185174b8ab687e79ac3978f8","unresolved":false,"context_lines":[{"line_number":25,"context_line":"you\u0027ll need to `define the entry point(s) \u003chttp://flake8.pycqa.org/en/latest/plugin-development/registering-plugins.html\u003e`_"},{"line_number":26,"context_line":"yourself."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Note that consumers adopting the library in a step-wise fashion may need to ignore a subset of the"},{"line_number":29,"context_line":"checks temporarily until they implement support/compliance."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"3aaa91ec_1c77533c","line":28,"in_reply_to":"3aaa91ec_79c4a93f","updated":"2016-06-28 16:11:21.000000000","message":"Right. That\u0027s all clear for existing checks. The question to run with the team is: how do we expand the list of checks in the library without incompatible breakage of existing consumers? If the answer is: we just add, release and let people unbreak their gates, so be it. But we should then state that consuming those checks is not safe for unguarded gates.","commit_id":"5d3b250f07821e0acc742aa93928ea1d95fc4c61"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"0914898cc519302e5b9f4e54b834517eb739c5ec","unresolved":false,"context_lines":[{"line_number":25,"context_line":"you\u0027ll need to `define the entry point(s) \u003chttp://flake8.pycqa.org/en/latest/plugin-development/registering-plugins.html\u003e`_"},{"line_number":26,"context_line":"yourself."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Note that consumers adopting the library in a step-wise fashion may need to ignore a subset of the"},{"line_number":29,"context_line":"checks temporarily until they implement support/compliance."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"3aaa91ec_79c4a93f","line":28,"in_reply_to":"3aaa91ec_f6e6e6e6","updated":"2016-06-28 16:00:18.000000000","message":"We\u0027ll discuss this in the next neutron-lib meeting.\n\n\nAlthough I don\u0027t have a context of the history yet, I can see existing work that implies neutron-lib sets the standard (checks) for neutron-lib complaint consumers. While consumers are migrating to the lib they ignore failing checks until compliant.\n\nFor example: https://github.com/openstack/neutron-lib/blob/master/neutron_lib/hacking/checks.py#L140\n\n\nMoreover consumers can obviously control (to some degree) the version of neutron-lib they consume.","commit_id":"5d3b250f07821e0acc742aa93928ea1d95fc4c61"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a49fe1c34001deb4cd49fadd193eab07a51141ad","unresolved":false,"context_lines":[{"line_number":13,"context_line":"The ``neutron_lib.hacking`` package implements a number of public `hacking checks \u003chttps://github.com/openstack-dev/hacking\u003e`_"},{"line_number":14,"context_line":"that you can use directly, or register in bulk using ``neutron_lib.hacking.checks.factory``. The ``factory`` function"},{"line_number":15,"context_line":"registers all neutron-lib hacking checks neutron-lib adopters should strive to enable and pass. Therefore, as"},{"line_number":16,"context_line":"checks are added to neutron-lib consumers (may) need to \"absorb\" new checks by ignoring them until compliant."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"For example, to register and run all the neutron-lib hacking checks via your ``tox -e pep8``,"},{"line_number":19,"context_line":"ensure your ``tox.ini`` contains the following::"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3aaa91ec_06194422","line":16,"updated":"2016-06-30 17:15:54.000000000","message":"how do I ignore them? are they actually registered with flake8 to be able to ignore?","commit_id":"70769995718fd21a3f5b9f1543198b3dda54defb"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"70dd7d539a9af45c303d3f6d710961504205c456","unresolved":false,"context_lines":[{"line_number":20,"context_line":"Adopters need not run these checks and thus a private hacking check factory is used within"},{"line_number":21,"context_line":"neutron-lib\u0027s hacking ``tox.ini`` configuration."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Adopter hacking checks"},{"line_number":24,"context_line":"----------------------"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"A set of checks provided by neutron-lib are intended to validate the \"compliance\" of neutron-lib adopter\u0027s"}],"source_content_type":"text/x-rst","patch_set":4,"id":"1aa78d24_c5fcd940","line":23,"updated":"2016-07-09 14:02:50.000000000","message":"Need to do general purpose checks too.","commit_id":"0d8fef83347bacb4169fe854ac92ce8d2228b824"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"81a63d527d253bf7a89cb26f155938371dc0cad4","unresolved":false,"context_lines":[{"line_number":31,"context_line":"registered via entry points are disabled by default and therefore must be selectively enabled by"},{"line_number":32,"context_line":"consumers wishing to utilize them."},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"To selectively enable check\u0027s consumer\u0027s must use ``flake8`` ``select`` to signify the checks to enable"},{"line_number":35,"context_line":"and run."},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"For example in your ``tox.ini``::"}],"source_content_type":"text/x-rst","patch_set":8,"id":"dada55a8_5654d5fd","line":34,"updated":"2016-07-20 10:16:15.000000000","message":"check\u0027s consumer\u0027s -\u003e checks, consumers","commit_id":"447bd09a220b579a6b7b7c32a0ad9230c92459aa"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"6b67058d5385a31715b700e585881f80e6192e1e","unresolved":false,"context_lines":[{"line_number":31,"context_line":"registered via entry points are disabled by default and therefore must be selectively enabled by"},{"line_number":32,"context_line":"consumers wishing to utilize them."},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"To selectively enable check\u0027s consumer\u0027s must use ``flake8`` ``select`` to signify the checks to enable"},{"line_number":35,"context_line":"and run."},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"For example in your ``tox.ini``::"}],"source_content_type":"text/x-rst","patch_set":8,"id":"dada55a8_bb8ec32b","line":34,"in_reply_to":"dada55a8_5654d5fd","updated":"2016-07-20 16:29:33.000000000","message":"Done","commit_id":"447bd09a220b579a6b7b7c32a0ad9230c92459aa"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"520ff0d23b44c80143b6a900c2397de34b239367","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"dada55a8_3d0a8c8a","updated":"2016-07-21 15:34:16.000000000","message":"Nit: can you wrap long lines? It\u0027s a bit hard to review in gerrit.","commit_id":"a1b0e3ada6c881c56d7cce87d6a34fd3d667f0a7"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"226af03f3e711b5b227ec373a3e6664c3e1d404d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"dada55a8_e6317ba3","in_reply_to":"dada55a8_3d0a8c8a","updated":"2016-07-21 17:52:13.000000000","message":"Done","commit_id":"a1b0e3ada6c881c56d7cce87d6a34fd3d667f0a7"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"520ff0d23b44c80143b6a900c2397de34b239367","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":"The set of hacking checks registered via ``latest_adopter_hacking_checks`` is dynamic and may change from"},{"line_number":59,"context_line":"release to release. Consumer\u0027s who are not fully complaint and therefore cannot pass all adopter hacking"},{"line_number":60,"context_line":"checks can selectively enable checks as described in the \u0027General purpose hacking checks\u0027 section herein."},{"line_number":61,"context_line":""},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"Hacking Checks Implemented"}],"source_content_type":"text/x-rst","patch_set":9,"id":"dada55a8_5d6dbfca","line":60,"range":{"start_line":60,"start_character":57,"end_line":60,"end_character":104},"updated":"2016-07-21 15:34:16.000000000","message":"Use a ref.","commit_id":"a1b0e3ada6c881c56d7cce87d6a34fd3d667f0a7"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"226af03f3e711b5b227ec373a3e6664c3e1d404d","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":"The set of hacking checks registered via ``latest_adopter_hacking_checks`` is dynamic and may change from"},{"line_number":59,"context_line":"release to release. Consumer\u0027s who are not fully complaint and therefore cannot pass all adopter hacking"},{"line_number":60,"context_line":"checks can selectively enable checks as described in the \u0027General purpose hacking checks\u0027 section herein."},{"line_number":61,"context_line":""},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"Hacking Checks Implemented"}],"source_content_type":"text/x-rst","patch_set":9,"id":"dada55a8_a6702341","line":60,"range":{"start_line":60,"start_character":57,"end_line":60,"end_character":104},"in_reply_to":"dada55a8_5d6dbfca","updated":"2016-07-21 17:52:13.000000000","message":"Done","commit_id":"a1b0e3ada6c881c56d7cce87d6a34fd3d667f0a7"}],"neutron_lib/hacking/checks.py":[{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"70dd7d539a9af45c303d3f6d710961504205c456","unresolved":false,"context_lines":[{"line_number":255,"context_line":"    name \u003d \u0027enabled-hacking-check-proxy\u0027"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"    @classmethod"},{"line_number":258,"context_line":"    def _parse_check_code(cls, check_fn):"},{"line_number":259,"context_line":"        return pep8.ERRORCODE_REGEX.findall(check_fn.__doc__ or \u0027\u0027)"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":4,"id":"1aa78d24_a5f70d58","line":258,"range":{"start_line":258,"start_character":8,"end_line":258,"end_character":25},"updated":"2016-07-09 14:02:50.000000000","message":"this method isn\u0027t needed, mise well just use the regex directly.","commit_id":"0d8fef83347bacb4169fe854ac92ce8d2228b824"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"c40cdf697615b9fbe5622624c5a37b1fd83c7dde","unresolved":false,"context_lines":[{"line_number":218,"context_line":""},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"def latest_adopter_hacking_checks(register):"},{"line_number":221,"context_line":"    \"\"\"Hacking check factory for neutron-lib adopter complaint checks."},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"    This factory registers all checks neutron-lib adopters should seek to"},{"line_number":224,"context_line":"    pass. The set of checks registered is the latest set of adopter checks"}],"source_content_type":"text/x-python","patch_set":7,"id":"1aa78d24_b96391dc","line":221,"range":{"start_line":221,"start_character":53,"end_line":221,"end_character":62},"updated":"2016-07-11 13:04:05.000000000","message":"compliant?","commit_id":"b92834d7c161ab84388d1c484aac284c5d7f081a"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"2b786d5c2b3917916bbe5241def00f35a2e4f4f1","unresolved":false,"context_lines":[{"line_number":218,"context_line":""},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"def latest_adopter_hacking_checks(register):"},{"line_number":221,"context_line":"    \"\"\"Hacking check factory for neutron-lib adopter complaint checks."},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"    This factory registers all checks neutron-lib adopters should seek to"},{"line_number":224,"context_line":"    pass. The set of checks registered is the latest set of adopter checks"}],"source_content_type":"text/x-python","patch_set":7,"id":"1aa78d24_e272827b","line":221,"range":{"start_line":221,"start_character":53,"end_line":221,"end_character":62},"in_reply_to":"1aa78d24_b96391dc","updated":"2016-07-11 13:49:43.000000000","message":"Done; english was never my strong suit! :)","commit_id":"b92834d7c161ab84388d1c484aac284c5d7f081a"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"64acdb02cc5ae70472a7f34add123307ec0ee69f","unresolved":false,"context_lines":[{"line_number":12,"context_line":"# License for the specific language governing permissions and limitations"},{"line_number":13,"context_line":"# under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"import pep8"},{"line_number":16,"context_line":"import re"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from debtcollector import moves"}],"source_content_type":"text/x-python","patch_set":8,"id":"dada55a8_42f9d44c","line":15,"updated":"2016-07-19 16:27:54.000000000","message":"pep8 is third party","commit_id":"447bd09a220b579a6b7b7c32a0ad9230c92459aa"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"9dc12513ce4a8797d51f4664d33b80f36eb790c6","unresolved":false,"context_lines":[{"line_number":12,"context_line":"# License for the specific language governing permissions and limitations"},{"line_number":13,"context_line":"# under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"import pep8"},{"line_number":16,"context_line":"import re"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from debtcollector import moves"}],"source_content_type":"text/x-python","patch_set":8,"id":"dada55a8_604e8b97","line":15,"in_reply_to":"dada55a8_42f9d44c","updated":"2016-07-19 18:51:43.000000000","message":"And what\u0027s the implication of such?\nOther projects are using pep8: http://codesearch.openstack.org/?q\u003dpep8\u0026i\u003dnope\u0026files\u003d.*.py\u0026repos\u003d","commit_id":"447bd09a220b579a6b7b7c32a0ad9230c92459aa"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"81a63d527d253bf7a89cb26f155938371dc0cad4","unresolved":false,"context_lines":[{"line_number":12,"context_line":"# License for the specific language governing permissions and limitations"},{"line_number":13,"context_line":"# under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"import pep8"},{"line_number":16,"context_line":"import re"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from debtcollector import moves"}],"source_content_type":"text/x-python","patch_set":8,"id":"dada55a8_769d99bb","line":15,"in_reply_to":"dada55a8_604e8b97","updated":"2016-07-20 10:16:15.000000000","message":"garyk suggests you move it to line 18 where other third party libs are imported.","commit_id":"447bd09a220b579a6b7b7c32a0ad9230c92459aa"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"6b67058d5385a31715b700e585881f80e6192e1e","unresolved":false,"context_lines":[{"line_number":12,"context_line":"# License for the specific language governing permissions and limitations"},{"line_number":13,"context_line":"# under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"import pep8"},{"line_number":16,"context_line":"import re"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from debtcollector import moves"}],"source_content_type":"text/x-python","patch_set":8,"id":"dada55a8_7b1babca","line":15,"in_reply_to":"dada55a8_769d99bb","updated":"2016-07-20 16:29:33.000000000","message":"thanks guys; I clearly need to revisit my style guidelines :)","commit_id":"447bd09a220b579a6b7b7c32a0ad9230c92459aa"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"81a63d527d253bf7a89cb26f155938371dc0cad4","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from debtcollector import moves"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from hacking import core"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"from neutron_lib.hacking import translation_checks"},{"line_number":23,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"dada55a8_d6ae05e5","line":20,"updated":"2016-07-20 10:16:15.000000000","message":"While at it, hacking should probably also belong to the same import section as debtcollector.","commit_id":"447bd09a220b579a6b7b7c32a0ad9230c92459aa"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"6b67058d5385a31715b700e585881f80e6192e1e","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from debtcollector import moves"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from hacking import core"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"from neutron_lib.hacking import translation_checks"},{"line_number":23,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"dada55a8_bb7fe3de","line":20,"in_reply_to":"dada55a8_d6ae05e5","updated":"2016-07-20 16:29:33.000000000","message":"Done","commit_id":"447bd09a220b579a6b7b7c32a0ad9230c92459aa"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"81a63d527d253bf7a89cb26f155938371dc0cad4","unresolved":false,"context_lines":[{"line_number":102,"context_line":""},{"line_number":103,"context_line":"@core.flake8ext"},{"line_number":104,"context_line":"@core.off_by_default"},{"line_number":105,"context_line":"def check_oslo_namespace_imports(logical_line):"},{"line_number":106,"context_line":"    \"\"\"N523 - Import oslo_ rather than oslo.\"\"\""},{"line_number":107,"context_line":"    x \u003d _check_namespace_imports(\u0027N523\u0027, \u0027oslo\u0027, \u0027oslo_\u0027, logical_line)"},{"line_number":108,"context_line":"    if x is not None:"}],"source_content_type":"text/x-python","patch_set":8,"id":"dada55a8_d6dc4575","line":105,"updated":"2016-07-20 10:16:15.000000000","message":"(No action required) I think this check is no more relevant since oslo stopped shipping oslo.* namespace a while ago.","commit_id":"447bd09a220b579a6b7b7c32a0ad9230c92459aa"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"81a63d527d253bf7a89cb26f155938371dc0cad4","unresolved":false,"context_lines":[{"line_number":251,"context_line":"    _register_and_enable_checks(register, _LIB_PROJECT_CHECKS)"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"class _ProxyHackingChecks(core.GlobalCheck):"},{"line_number":255,"context_line":"    name \u003d \u0027enabled-hacking-check-proxy\u0027"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":8,"id":"dada55a8_31c7ab65","line":254,"updated":"2016-07-20 10:16:15.000000000","message":"Would you mind describing the goal of the class, and its machinery, in docstring? It\u0027s far from obvious.","commit_id":"447bd09a220b579a6b7b7c32a0ad9230c92459aa"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"6b67058d5385a31715b700e585881f80e6192e1e","unresolved":false,"context_lines":[{"line_number":251,"context_line":"    _register_and_enable_checks(register, _LIB_PROJECT_CHECKS)"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"class _ProxyHackingChecks(core.GlobalCheck):"},{"line_number":255,"context_line":"    name \u003d \u0027enabled-hacking-check-proxy\u0027"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":8,"id":"dada55a8_093ea5d9","line":254,"in_reply_to":"dada55a8_31c7ab65","updated":"2016-07-20 16:29:33.000000000","message":"Done","commit_id":"447bd09a220b579a6b7b7c32a0ad9230c92459aa"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"81a63d527d253bf7a89cb26f155938371dc0cad4","unresolved":false,"context_lines":[{"line_number":263,"context_line":"        for fn_name, check_data in _get_pep8_checks().items():"},{"line_number":264,"context_line":"            check_fn \u003d check_data[1]"},{"line_number":265,"context_line":""},{"line_number":266,"context_line":"            if hasattr(check_fn, \u0027off_by_default\u0027):"},{"line_number":267,"context_line":"                enabled \u003d not getattr(check_fn, \u0027off_by_default\u0027, False)"},{"line_number":268,"context_line":"                if enabled:"},{"line_number":269,"context_line":"                    check_codes \u003d pep8.ERRORCODE_REGEX.findall("}],"source_content_type":"text/x-python","patch_set":8,"id":"dada55a8_f68b49c1","line":266,"updated":"2016-07-20 10:16:15.000000000","message":"I think the line is redundant since the next line will fallback to False on missing attribute.","commit_id":"447bd09a220b579a6b7b7c32a0ad9230c92459aa"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"6b67058d5385a31715b700e585881f80e6192e1e","unresolved":false,"context_lines":[{"line_number":263,"context_line":"        for fn_name, check_data in _get_pep8_checks().items():"},{"line_number":264,"context_line":"            check_fn \u003d check_data[1]"},{"line_number":265,"context_line":""},{"line_number":266,"context_line":"            if hasattr(check_fn, \u0027off_by_default\u0027):"},{"line_number":267,"context_line":"                enabled \u003d not getattr(check_fn, \u0027off_by_default\u0027, False)"},{"line_number":268,"context_line":"                if enabled:"},{"line_number":269,"context_line":"                    check_codes \u003d pep8.ERRORCODE_REGEX.findall("}],"source_content_type":"text/x-python","patch_set":8,"id":"dada55a8_649828c1","line":266,"in_reply_to":"dada55a8_f68b49c1","updated":"2016-07-20 16:29:33.000000000","message":"Done","commit_id":"447bd09a220b579a6b7b7c32a0ad9230c92459aa"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"9d3d8cf9c8608ee3e9419dc6191d1715f88d38e5","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        return (0, msg_o or msg)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"@core.flake8ext"},{"line_number":103,"context_line":"@core.off_by_default"},{"line_number":104,"context_line":"def check_oslo_namespace_imports(logical_line):"},{"line_number":105,"context_line":"    \"\"\"N523 - Import oslo_ rather than oslo.\"\"\""}],"source_content_type":"text/x-python","patch_set":9,"id":"dada55a8_dbe39cd7","line":102,"updated":"2016-07-21 04:20:51.000000000","message":"can you please base this above https://review.openstack.org/345026","commit_id":"a1b0e3ada6c881c56d7cce87d6a34fd3d667f0a7"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"1e36f06b9001e974be600c7fe3b838f95e029b0d","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        return (0, msg_o or msg)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"@core.flake8ext"},{"line_number":103,"context_line":"@core.off_by_default"},{"line_number":104,"context_line":"def check_oslo_namespace_imports(logical_line):"},{"line_number":105,"context_line":"    \"\"\"N523 - Import oslo_ rather than oslo.\"\"\""}],"source_content_type":"text/x-python","patch_set":9,"id":"dada55a8_d9b6f6f7","line":102,"in_reply_to":"dada55a8_dbe39cd7","updated":"2016-07-21 10:43:55.000000000","message":"When it merges I will","commit_id":"a1b0e3ada6c881c56d7cce87d6a34fd3d667f0a7"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"048df6aefb41fe20802316a69cd60476ac23aa3c","unresolved":false,"context_lines":[{"line_number":113,"context_line":"@core.flake8ext"},{"line_number":114,"context_line":"@core.off_by_default"},{"line_number":115,"context_line":"def check_no_contextlib_nested(logical_line, filename):"},{"line_number":116,"context_line":"    \"\"\"N524 - Use of contextlib.nest is deprecated.\"\"\""},{"line_number":117,"context_line":"    msg \u003d (\"N524: contextlib.nested is deprecated. With Python 2.7 and later \""},{"line_number":118,"context_line":"           \"the with-statement supports multiple nested objects. See https://\""},{"line_number":119,"context_line":"           \"docs.python.org/2/library/contextlib.html#contextlib.nested for \""}],"source_content_type":"text/x-python","patch_set":10,"id":"bacf61ea_3e956432","line":116,"range":{"start_line":116,"start_character":32,"end_line":116,"end_character":36},"updated":"2016-08-01 20:54:01.000000000","message":"nested","commit_id":"8a877716d60744ac44338be291a62857cf849340"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"9df6cd656ca87ad278fdb0aae8f2be2ea816d915","unresolved":false,"context_lines":[{"line_number":113,"context_line":"@core.flake8ext"},{"line_number":114,"context_line":"@core.off_by_default"},{"line_number":115,"context_line":"def check_no_contextlib_nested(logical_line, filename):"},{"line_number":116,"context_line":"    \"\"\"N524 - Use of contextlib.nest is deprecated.\"\"\""},{"line_number":117,"context_line":"    msg \u003d (\"N524: contextlib.nested is deprecated. With Python 2.7 and later \""},{"line_number":118,"context_line":"           \"the with-statement supports multiple nested objects. See https://\""},{"line_number":119,"context_line":"           \"docs.python.org/2/library/contextlib.html#contextlib.nested for \""}],"source_content_type":"text/x-python","patch_set":10,"id":"bacf61ea_4ed4ceea","line":116,"range":{"start_line":116,"start_character":32,"end_line":116,"end_character":36},"in_reply_to":"bacf61ea_3e956432","updated":"2016-08-02 10:45:52.000000000","message":"Done","commit_id":"8a877716d60744ac44338be291a62857cf849340"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"048df6aefb41fe20802316a69cd60476ac23aa3c","unresolved":false,"context_lines":[{"line_number":261,"context_line":"    default."},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"    This flake8 extension is registered via entry point and performs option"},{"line_number":264,"context_line":"    handling (https://goo.gl/Y0Q2po) to ensure any changes to hacking check"},{"line_number":265,"context_line":"    off_by_default are reflected in the checks ignored in the options. This"},{"line_number":266,"context_line":"    allows consumers to use our hacking check factory methods to enable"},{"line_number":267,"context_line":"    checks pragmatically."}],"source_content_type":"text/x-python","patch_set":10,"id":"bacf61ea_be3dd42c","line":264,"range":{"start_line":264,"start_character":14,"end_line":264,"end_character":35},"updated":"2016-08-01 20:54:01.000000000","message":"Not sure it\u0027s ok to rely on google url shortener for documentation purposes.","commit_id":"8a877716d60744ac44338be291a62857cf849340"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"9df6cd656ca87ad278fdb0aae8f2be2ea816d915","unresolved":false,"context_lines":[{"line_number":261,"context_line":"    default."},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"    This flake8 extension is registered via entry point and performs option"},{"line_number":264,"context_line":"    handling (https://goo.gl/Y0Q2po) to ensure any changes to hacking check"},{"line_number":265,"context_line":"    off_by_default are reflected in the checks ignored in the options. This"},{"line_number":266,"context_line":"    allows consumers to use our hacking check factory methods to enable"},{"line_number":267,"context_line":"    checks pragmatically."}],"source_content_type":"text/x-python","patch_set":10,"id":"bacf61ea_ce06fe84","line":264,"range":{"start_line":264,"start_character":14,"end_line":264,"end_character":35},"in_reply_to":"bacf61ea_be3dd42c","updated":"2016-08-02 10:45:52.000000000","message":"Done","commit_id":"8a877716d60744ac44338be291a62857cf849340"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"048df6aefb41fe20802316a69cd60476ac23aa3c","unresolved":false,"context_lines":[{"line_number":284,"context_line":"                for code in check_codes:"},{"line_number":285,"context_line":"                    if code in ignore:"},{"line_number":286,"context_line":"                        ignore.remove(code)"},{"line_number":287,"context_line":"        opts.ignore \u003d tuple(ignore)"}],"source_content_type":"text/x-python","patch_set":10,"id":"bacf61ea_5ebf7860","line":287,"updated":"2016-08-01 20:54:01.000000000","message":"Does it mean that we don\u0027t allow users to disable checks that are enabled by default? It\u0027s not clear to me why we do it. Or, alternatively, I misinterpret the code.","commit_id":"8a877716d60744ac44338be291a62857cf849340"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"472c13ded2c333bff496fccd8ac336382863b2fc","unresolved":false,"context_lines":[{"line_number":284,"context_line":"                for code in check_codes:"},{"line_number":285,"context_line":"                    if code in ignore:"},{"line_number":286,"context_line":"                        ignore.remove(code)"},{"line_number":287,"context_line":"        opts.ignore \u003d tuple(ignore)"}],"source_content_type":"text/x-python","patch_set":10,"id":"bacf61ea_a9e2a4d2","line":287,"in_reply_to":"bacf61ea_2e87dab5","updated":"2016-08-02 11:00:29.000000000","message":"The way I read the code, if a check has off_by_default \u003d\u003d False (lines 280-281), then we remove all checks (line 286) that were originally passed by user with the ignore option (line 273) from the list to ignore.\n\nAssuming that\u0027s the correct way to read it, then how are users supposed to ignore checks that are not off_by_default \u003d\u003d True? You seem to disallow to use ignore option for that.","commit_id":"8a877716d60744ac44338be291a62857cf849340"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"9df6cd656ca87ad278fdb0aae8f2be2ea816d915","unresolved":false,"context_lines":[{"line_number":284,"context_line":"                for code in check_codes:"},{"line_number":285,"context_line":"                    if code in ignore:"},{"line_number":286,"context_line":"                        ignore.remove(code)"},{"line_number":287,"context_line":"        opts.ignore \u003d tuple(ignore)"}],"source_content_type":"text/x-python","patch_set":10,"id":"bacf61ea_2e87dab5","line":287,"in_reply_to":"bacf61ea_5ebf7860","updated":"2016-08-02 10:45:52.000000000","message":"All checks are disabled by default. Consumers use flake8\u0027s select/ignore options to enabled/disable checks in a granular fashion.\n\n\nOr, perhaps I\u0027m misunderstanding your question?","commit_id":"8a877716d60744ac44338be291a62857cf849340"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"6df5d26a3d0a06a9caa8c76826dc8ac034f6bc56","unresolved":false,"context_lines":[{"line_number":284,"context_line":"                for code in check_codes:"},{"line_number":285,"context_line":"                    if code in ignore:"},{"line_number":286,"context_line":"                        ignore.remove(code)"},{"line_number":287,"context_line":"        opts.ignore \u003d tuple(ignore)"}],"source_content_type":"text/x-python","patch_set":10,"id":"bacf61ea_83020d0a","line":287,"in_reply_to":"bacf61ea_a9e2a4d2","updated":"2016-08-02 15:04:50.000000000","message":"To clarify the code; if a check is enabled by default (280-281) the checks code(s) are parsed (e.g. N530) and removed from options.ignore (if they exist in that list). options.ignore can be thought of as the \"default ignore\" list whereupon user specified ignore/select options take precedence.\n\n\nFor example, here I have all the neutron-lib checks enabled by default so we see the checks run::\n\nboden@ubuntu:~/src/python/neutron-lib$ flake8 /tmp/t.py\n/tmp/t.py:3:21: N534  Untranslated exception message.\n/tmp/t.py:4:1: W391 blank line at end of file\n\n\nIf I want to disable a check, just use --ignore::\n\nboden@ubuntu:~/src/python/neutron-lib$ flake8 --ignore N534 /tmp/t.py\n/tmp/t.py:4:1: W391 blank line at end of file\n\n\n\nI added a few more comments to the latest patch set in hopes they provide additional clarification on this topic.","commit_id":"8a877716d60744ac44338be291a62857cf849340"}],"neutron_lib/hacking/translation_checks.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"9d3d8cf9c8608ee3e9419dc6191d1715f88d38e5","unresolved":false,"context_lines":[{"line_number":15,"context_line":"import re"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"import pep8"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from hacking import core"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"dada55a8_7bd39004","line":18,"updated":"2016-07-21 04:20:51.000000000","message":"nit - no need for the new line here","commit_id":"a1b0e3ada6c881c56d7cce87d6a34fd3d667f0a7"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"226af03f3e711b5b227ec373a3e6664c3e1d404d","unresolved":false,"context_lines":[{"line_number":15,"context_line":"import re"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"import pep8"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from hacking import core"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"dada55a8_86d4ffeb","line":18,"in_reply_to":"dada55a8_5d66602a","updated":"2016-07-21 17:52:13.000000000","message":"Done","commit_id":"a1b0e3ada6c881c56d7cce87d6a34fd3d667f0a7"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"520ff0d23b44c80143b6a900c2397de34b239367","unresolved":false,"context_lines":[{"line_number":15,"context_line":"import re"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"import pep8"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from hacking import core"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"dada55a8_5d66602a","line":18,"in_reply_to":"dada55a8_7bd39004","updated":"2016-07-21 15:34:16.000000000","message":"Yes, and hacking is before pep8 alphabetically.","commit_id":"a1b0e3ada6c881c56d7cce87d6a34fd3d667f0a7"}],"neutron_lib/tests/unit/hacking/test_checks.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"64acdb02cc5ae70472a7f34add123307ec0ee69f","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"import contextlib"},{"line_number":14,"context_line":"import math"},{"line_number":15,"context_line":"import mock"},{"line_number":16,"context_line":"import pep8"},{"line_number":17,"context_line":"import testtools"},{"line_number":18,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"dada55a8_a2bd306a","line":15,"updated":"2016-07-19 16:27:54.000000000","message":"mock is third party","commit_id":"447bd09a220b579a6b7b7c32a0ad9230c92459aa"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"6b67058d5385a31715b700e585881f80e6192e1e","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"import contextlib"},{"line_number":14,"context_line":"import math"},{"line_number":15,"context_line":"import mock"},{"line_number":16,"context_line":"import pep8"},{"line_number":17,"context_line":"import testtools"},{"line_number":18,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"dada55a8_e4d1b858","line":15,"in_reply_to":"dada55a8_a2bd306a","updated":"2016-07-20 16:29:33.000000000","message":"Done","commit_id":"447bd09a220b579a6b7b7c32a0ad9230c92459aa"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"9dc12513ce4a8797d51f4664d33b80f36eb790c6","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"import contextlib"},{"line_number":14,"context_line":"import math"},{"line_number":15,"context_line":"import mock"},{"line_number":16,"context_line":"import pep8"},{"line_number":17,"context_line":"import testtools"},{"line_number":18,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"dada55a8_601ccb77","line":15,"in_reply_to":"dada55a8_a2bd306a","updated":"2016-07-19 18:51:43.000000000","message":"I\u0027m not understanding the implication here. We import mock elsewhere in neutron_lib.","commit_id":"447bd09a220b579a6b7b7c32a0ad9230c92459aa"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"64acdb02cc5ae70472a7f34add123307ec0ee69f","unresolved":false,"context_lines":[{"line_number":13,"context_line":"import contextlib"},{"line_number":14,"context_line":"import math"},{"line_number":15,"context_line":"import mock"},{"line_number":16,"context_line":"import pep8"},{"line_number":17,"context_line":"import testtools"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from neutron_lib.hacking import checks"}],"source_content_type":"text/x-python","patch_set":8,"id":"dada55a8_0286bcb8","line":16,"updated":"2016-07-19 16:27:54.000000000","message":"ditto","commit_id":"447bd09a220b579a6b7b7c32a0ad9230c92459aa"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"9dc12513ce4a8797d51f4664d33b80f36eb790c6","unresolved":false,"context_lines":[{"line_number":13,"context_line":"import contextlib"},{"line_number":14,"context_line":"import math"},{"line_number":15,"context_line":"import mock"},{"line_number":16,"context_line":"import pep8"},{"line_number":17,"context_line":"import testtools"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from neutron_lib.hacking import checks"}],"source_content_type":"text/x-python","patch_set":8,"id":"dada55a8_405a6750","line":16,"in_reply_to":"dada55a8_0286bcb8","updated":"2016-07-19 18:51:43.000000000","message":"And what\u0027s the implication of such?\nOther projects are using pep8: http://codesearch.openstack.org/?q\u003dpep8\u0026i\u003dnope\u0026files\u003d.*.py\u0026repos\u003d","commit_id":"447bd09a220b579a6b7b7c32a0ad9230c92459aa"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"333a4f8f7782561fb90cca2b1c1ae82e75f559e8","unresolved":false,"context_lines":[{"line_number":13,"context_line":"import contextlib"},{"line_number":14,"context_line":"import math"},{"line_number":15,"context_line":"import mock"},{"line_number":16,"context_line":"import pep8"},{"line_number":17,"context_line":"import testtools"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from neutron_lib.hacking import checks"}],"source_content_type":"text/x-python","patch_set":8,"id":"dada55a8_7de8e8b4","line":16,"in_reply_to":"dada55a8_405a6750","updated":"2016-07-20 01:04:12.000000000","message":"it should be as follows:\n\n### standard python imports\nimport contextlib\nimport math\n\n# third party imports (after a new line)\nimport mock\nimport pep8\nimport testtools","commit_id":"447bd09a220b579a6b7b7c32a0ad9230c92459aa"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"6b67058d5385a31715b700e585881f80e6192e1e","unresolved":false,"context_lines":[{"line_number":13,"context_line":"import contextlib"},{"line_number":14,"context_line":"import math"},{"line_number":15,"context_line":"import mock"},{"line_number":16,"context_line":"import pep8"},{"line_number":17,"context_line":"import testtools"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from neutron_lib.hacking import checks"}],"source_content_type":"text/x-python","patch_set":8,"id":"dada55a8_c4d6344e","line":16,"in_reply_to":"dada55a8_7de8e8b4","updated":"2016-07-20 16:29:33.000000000","message":"Done","commit_id":"447bd09a220b579a6b7b7c32a0ad9230c92459aa"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"81a63d527d253bf7a89cb26f155938371dc0cad4","unresolved":false,"context_lines":[{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    @contextlib.contextmanager"},{"line_number":174,"context_line":"    def _mocked_style_guide_checks(self, pep_checks):"},{"line_number":175,"context_line":"        list_size \u003d int(math.ceil(float(len(pep_checks)) / 3.0))"},{"line_number":176,"context_line":"        chunks \u003d [pep_checks[i:i+list_size]"},{"line_number":177,"context_line":"                  for i in range(0, len(pep_checks), list_size)]"},{"line_number":178,"context_line":"        indexed \u003d [[], [], []]"}],"source_content_type":"text/x-python","patch_set":8,"id":"dada55a8_1168a786","line":175,"updated":"2016-07-20 10:16:15.000000000","message":"I struggle to understand the goal of the code. May I suggest making it more obvious, with comments or code simplification?","commit_id":"447bd09a220b579a6b7b7c32a0ad9230c92459aa"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"6b67058d5385a31715b700e585881f80e6192e1e","unresolved":false,"context_lines":[{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    @contextlib.contextmanager"},{"line_number":174,"context_line":"    def _mocked_style_guide_checks(self, pep_checks):"},{"line_number":175,"context_line":"        list_size \u003d int(math.ceil(float(len(pep_checks)) / 3.0))"},{"line_number":176,"context_line":"        chunks \u003d [pep_checks[i:i+list_size]"},{"line_number":177,"context_line":"                  for i in range(0, len(pep_checks), list_size)]"},{"line_number":178,"context_line":"        indexed \u003d [[], [], []]"}],"source_content_type":"text/x-python","patch_set":8,"id":"dada55a8_0485ec05","line":175,"in_reply_to":"dada55a8_1168a786","updated":"2016-07-20 16:29:33.000000000","message":"Done","commit_id":"447bd09a220b579a6b7b7c32a0ad9230c92459aa"}],"setup.cfg":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"6a71949a7608f950c54a683c7f1f0b4be1949ad9","unresolved":false,"context_lines":[{"line_number":46,"context_line":"output_file \u003d neutron_lib/locale/neutron_lib.pot"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"[entry_points]"},{"line_number":49,"context_line":"flake8.extension \u003d"},{"line_number":50,"context_line":"    N521 \u003d neutron_lib.hacking.checks:use_jsonutils"},{"line_number":51,"context_line":"    N523 \u003d neutron_lib.hacking.checks:check_oslo_namespace_imports"},{"line_number":52,"context_line":"    N524 \u003d neutron_lib.hacking.checks:check_no_contextlib_nested"}],"source_content_type":"text/x-ttcn-cfg","patch_set":1,"id":"3aaa91ec_16d943f3","line":49,"updated":"2016-06-27 11:53:14.000000000","message":"With those checks registered in the namespace, wouldn\u0027t it mean that now all calls to flake8 in environments where the library is installed will result in triggering those checks? If that\u0027s the case, that is unsafe for other gates that may pull the library into their venvs.\n\nWe may want to disable all the checks with off_by_default decorator, enable them in tox.ini for just that repo; and then allow consuming projects to \u0027select\u0027 the needed checks in their flake8 environments.","commit_id":"7b0cd3db2b05bac0a48fdd3d73f07df6f7b5bab0"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"146f5e1bb07b44af877eb480761b6c2e34096dad","unresolved":false,"context_lines":[{"line_number":46,"context_line":"output_file \u003d neutron_lib/locale/neutron_lib.pot"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"[entry_points]"},{"line_number":49,"context_line":"flake8.extension \u003d"},{"line_number":50,"context_line":"    N521 \u003d neutron_lib.hacking.checks:use_jsonutils"},{"line_number":51,"context_line":"    N523 \u003d neutron_lib.hacking.checks:check_oslo_namespace_imports"},{"line_number":52,"context_line":"    N524 \u003d neutron_lib.hacking.checks:check_no_contextlib_nested"}],"source_content_type":"text/x-ttcn-cfg","patch_set":1,"id":"3aaa91ec_ddfd0c0a","line":49,"in_reply_to":"3aaa91ec_16d943f3","updated":"2016-06-27 15:26:04.000000000","message":"Thanks for bringing this up.\nToday our consumers expect the checks registered through our hacking check factory() to be enabled by default, so changing them to disabled by default is effectively a change in our public API IMO; and we don\u0027t want to do that without following our guidelines for deprecation.\n\n\nI\u0027m looking into options that will accommodate backwards compatibility while still registering the check entry points as disabled.","commit_id":"7b0cd3db2b05bac0a48fdd3d73f07df6f7b5bab0"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"81a63d527d253bf7a89cb26f155938371dc0cad4","unresolved":false,"context_lines":[{"line_number":47,"context_line":""},{"line_number":48,"context_line":"[entry_points]"},{"line_number":49,"context_line":"flake8.extension \u003d"},{"line_number":50,"context_line":"    D000 \u003d neutron_lib.hacking.checks:_ProxyHackingChecks"},{"line_number":51,"context_line":"    N521 \u003d neutron_lib.hacking.checks:use_jsonutils"},{"line_number":52,"context_line":"    N523 \u003d neutron_lib.hacking.checks:check_oslo_namespace_imports"},{"line_number":53,"context_line":"    N524 \u003d neutron_lib.hacking.checks:check_no_contextlib_nested"}],"source_content_type":"text/x-ttcn-cfg","patch_set":8,"id":"dada55a8_31accb8b","line":50,"updated":"2016-07-20 10:16:15.000000000","message":"What is the rationale for that entry point? What is the name supposed to mean?","commit_id":"447bd09a220b579a6b7b7c32a0ad9230c92459aa"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"81a63d527d253bf7a89cb26f155938371dc0cad4","unresolved":false,"context_lines":[{"line_number":48,"context_line":"[entry_points]"},{"line_number":49,"context_line":"flake8.extension \u003d"},{"line_number":50,"context_line":"    D000 \u003d neutron_lib.hacking.checks:_ProxyHackingChecks"},{"line_number":51,"context_line":"    N521 \u003d neutron_lib.hacking.checks:use_jsonutils"},{"line_number":52,"context_line":"    N523 \u003d neutron_lib.hacking.checks:check_oslo_namespace_imports"},{"line_number":53,"context_line":"    N524 \u003d neutron_lib.hacking.checks:check_no_contextlib_nested"},{"line_number":54,"context_line":"    N525 \u003d neutron_lib.hacking.checks:check_python3_xrange"}],"source_content_type":"text/x-ttcn-cfg","patch_set":8,"id":"dada55a8_b1e55bdd","line":51,"updated":"2016-07-20 10:16:15.000000000","message":"(No action required) Seems like nova uses a similar naming scheme for its checks (NXXX). I wonder whether it may become a problem some time in the future.","commit_id":"447bd09a220b579a6b7b7c32a0ad9230c92459aa"}],"test-requirements.txt":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"64acdb02cc5ae70472a7f34add123307ec0ee69f","unresolved":false,"context_lines":[{"line_number":2,"context_line":"# of appearance. Changing the order has an impact on the overall integration"},{"line_number":3,"context_line":"# process, which may cause wedges in the gate later."},{"line_number":4,"context_line":""},{"line_number":5,"context_line":"hacking\u003c0.12,\u003e\u003d0.11.0 # Apache-2.0"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"coverage\u003e\u003d3.6 # Apache-2.0"},{"line_number":8,"context_line":"discover # BSD"}],"source_content_type":"text/plain","patch_set":8,"id":"dada55a8_82358cf8","line":5,"updated":"2016-07-19 16:27:54.000000000","message":"why are you updating this? the jenkins job should update if necessary","commit_id":"447bd09a220b579a6b7b7c32a0ad9230c92459aa"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"9dc12513ce4a8797d51f4664d33b80f36eb790c6","unresolved":false,"context_lines":[{"line_number":2,"context_line":"# of appearance. Changing the order has an impact on the overall integration"},{"line_number":3,"context_line":"# process, which may cause wedges in the gate later."},{"line_number":4,"context_line":""},{"line_number":5,"context_line":"hacking\u003c0.12,\u003e\u003d0.11.0 # Apache-2.0"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"coverage\u003e\u003d3.6 # Apache-2.0"},{"line_number":8,"context_line":"discover # BSD"}],"source_content_type":"text/plain","patch_set":8,"id":"dada55a8_fbc50e8e","line":5,"in_reply_to":"dada55a8_82358cf8","updated":"2016-07-19 18:51:43.000000000","message":"I\u0027m confused; other projects are using this version including neutron: http://codesearch.openstack.org/?q\u003dhacking%3C0.12%2C%3E%3D0.11.0\u0026i\u003dnope\u0026files\u003d.*.txt\u0026repos\u003d\n\nWhy has the bot not proposed it to neutron-lib yet?","commit_id":"447bd09a220b579a6b7b7c32a0ad9230c92459aa"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"6b67058d5385a31715b700e585881f80e6192e1e","unresolved":false,"context_lines":[{"line_number":2,"context_line":"# of appearance. Changing the order has an impact on the overall integration"},{"line_number":3,"context_line":"# process, which may cause wedges in the gate later."},{"line_number":4,"context_line":""},{"line_number":5,"context_line":"hacking\u003c0.12,\u003e\u003d0.11.0 # Apache-2.0"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"coverage\u003e\u003d3.6 # Apache-2.0"},{"line_number":8,"context_line":"discover # BSD"}],"source_content_type":"text/plain","patch_set":8,"id":"dada55a8_2433d063","line":5,"in_reply_to":"dada55a8_9b3956f5","updated":"2016-07-20 16:29:33.000000000","message":"Ihar: thanks\n\nGary: so this update should be OK.","commit_id":"447bd09a220b579a6b7b7c32a0ad9230c92459aa"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"e972868ae2a106a8b7d84df63bc5194c4cebcefe","unresolved":false,"context_lines":[{"line_number":2,"context_line":"# of appearance. Changing the order has an impact on the overall integration"},{"line_number":3,"context_line":"# process, which may cause wedges in the gate later."},{"line_number":4,"context_line":""},{"line_number":5,"context_line":"hacking\u003c0.12,\u003e\u003d0.11.0 # Apache-2.0"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"coverage\u003e\u003d3.6 # Apache-2.0"},{"line_number":8,"context_line":"discover # BSD"}],"source_content_type":"text/plain","patch_set":8,"id":"dada55a8_9b3956f5","line":5,"in_reply_to":"dada55a8_9dcddc5f","updated":"2016-07-20 09:51:32.000000000","message":"Because hacking is a special case: https://github.com/openstack/requirements/blob/master/openstack_requirements/cmds/update.py#L125","commit_id":"447bd09a220b579a6b7b7c32a0ad9230c92459aa"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"333a4f8f7782561fb90cca2b1c1ae82e75f559e8","unresolved":false,"context_lines":[{"line_number":2,"context_line":"# of appearance. Changing the order has an impact on the overall integration"},{"line_number":3,"context_line":"# process, which may cause wedges in the gate later."},{"line_number":4,"context_line":""},{"line_number":5,"context_line":"hacking\u003c0.12,\u003e\u003d0.11.0 # Apache-2.0"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"coverage\u003e\u003d3.6 # Apache-2.0"},{"line_number":8,"context_line":"discover # BSD"}],"source_content_type":"text/plain","patch_set":8,"id":"dada55a8_9dcddc5f","line":5,"in_reply_to":"dada55a8_fbc50e8e","updated":"2016-07-20 01:04:12.000000000","message":"not sure. this may be a infra issue.","commit_id":"447bd09a220b579a6b7b7c32a0ad9230c92459aa"}]}
