)]}'
{"pbr/tests/test_version.py":[{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"85720aa2ae7e371a668ee05c89121963fbbecf24","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        self.useFixture(fixtures.MonkeyPatch(\u0027sys.argv\u0027, [\u0027foo\u0027]))"},{"line_number":45,"context_line":"        self.useFixture(fixtures.MonkeyPatch(\u0027os.path.exists\u0027,"},{"line_number":46,"context_line":"                        lambda p: p in config_files))"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        self.assertEqual("},{"line_number":49,"context_line":"            version._find_config_files(project\u003d\u0027blaa\u0027), config_files)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAQn%2F%2Fvt4%3D","line":46,"updated":"2013-07-24 01:21:58.000000000","message":"These fixtures are repeated; I suggest either a helper method, or a small fixture to wrap them both.","commit_id":"14300070ce6f6505882ef7ce3d0fcbf3c00ca1fb"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"85720aa2ae7e371a668ee05c89121963fbbecf24","unresolved":false,"context_lines":[{"line_number":46,"context_line":"                        lambda p: p in config_files))"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        self.assertEqual("},{"line_number":49,"context_line":"            version._find_config_files(project\u003d\u0027blaa\u0027), config_files)"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def test_find_config_files_with_extension(self):"},{"line_number":52,"context_line":"        config_files \u003d [\u0027/etc/foo.json\u0027]"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAQn%2F%2Fvt8%3D","line":49,"updated":"2013-07-24 01:21:58.000000000","message":"This is minor, but the signature for assertEqual is (expected, observed), which you have inverted here. (and below)","commit_id":"14300070ce6f6505882ef7ce3d0fcbf3c00ca1fb"}],"pbr/version.py":[{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"85720aa2ae7e371a668ee05c89121963fbbecf24","unresolved":false,"context_lines":[{"line_number":23,"context_line":"try:"},{"line_number":24,"context_line":"    import ConfigParser as configparser"},{"line_number":25,"context_line":"except ImportError:"},{"line_number":26,"context_line":"    import configparser"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"import pkg_resources"},{"line_number":29,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAQn%2F%2Fvtw%3D","line":26,"updated":"2013-07-24 01:21:58.000000000","message":"from extras import try_imports\nconfig_parser \u003d try_imports([\u0027ConfigParser\u0027, \u0027configparser\u0027])","commit_id":"14300070ce6f6505882ef7ce3d0fcbf3c00ca1fb"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"85720aa2ae7e371a668ee05c89121963fbbecf24","unresolved":false,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"def _fixpath(p):"},{"line_number":32,"context_line":"    \"\"\"Apply tilde expansion and absolutization to a path.\"\"\""},{"line_number":33,"context_line":"    return os.path.abspath(os.path.expanduser(p))"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAQn%2F%2Fvtg%3D","line":32,"updated":"2013-07-24 01:21:58.000000000","message":"I blinked; I would have said:\n\"\"\"Expand tildes and convert to an absolute path.\"\"\"\n\nMore importantly, \u0027fixpath\u0027 isn\u0027t a very meaningful name. You may actually be wanting the canonical path - it\u0027s not clear to me.","commit_id":"14300070ce6f6505882ef7ce3d0fcbf3c00ca1fb"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"85720aa2ae7e371a668ee05c89121963fbbecf24","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"def _get_config_dirs(project\u003dNone):"},{"line_number":37,"context_line":"    \"\"\"Return a list of directors where config files may be located."},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    :param project: an optional project name"},{"line_number":40,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAQn%2F%2FvtU%3D","line":37,"updated":"2013-07-24 01:21:58.000000000","message":"missing ie :).","commit_id":"14300070ce6f6505882ef7ce3d0fcbf3c00ca1fb"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"85720aa2ae7e371a668ee05c89121963fbbecf24","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    :param project: an optional project name"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    If a project is specified, following directories are returned::"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"      ~/.${project}/"},{"line_number":44,"context_line":"      ~/"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAQn%2F%2FvtQ%3D","line":41,"updated":"2013-07-24 01:21:58.000000000","message":"missing \u0027the\u0027.","commit_id":"14300070ce6f6505882ef7ce3d0fcbf3c00ca1fb"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"85720aa2ae7e371a668ee05c89121963fbbecf24","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        \u0027/etc\u0027"},{"line_number":58,"context_line":"    ]"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    return list(_filter(bool, cfg_dirs))"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"def _search_dirs(dirs, basename, extension\u003d\"\"):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAQn%2F%2FvtI%3D","line":60,"updated":"2013-07-24 01:21:58.000000000","message":"This is clever code but I think much less obvious than;\nif project:\n    return [...]\nelse:\n    return [...]","commit_id":"14300070ce6f6505882ef7ce3d0fcbf3c00ca1fb"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"85720aa2ae7e371a668ee05c89121963fbbecf24","unresolved":false,"context_lines":[{"line_number":74,"context_line":"    for d in dirs:"},{"line_number":75,"context_line":"        path \u003d os.path.join(d, \u0027%s%s\u0027 % (basename, extension))"},{"line_number":76,"context_line":"        if os.path.exists(path):"},{"line_number":77,"context_line":"            return path"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"def _filter(*args):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAQn%2F%2Fvs0%3D","line":77,"updated":"2013-07-24 01:21:58.000000000","message":"Why are basename and extension separated here? All it does is join them...\n\nAlso if this returned [path] and [] then the lower function could use extend not append and be simpler.","commit_id":"14300070ce6f6505882ef7ce3d0fcbf3c00ca1fb"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"85720aa2ae7e371a668ee05c89121963fbbecf24","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        import itertools"},{"line_number":83,"context_line":"        return itertools.ifilter(*args)"},{"line_number":84,"context_line":"    else:"},{"line_number":85,"context_line":"        return filter(*args)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"def _find_config_files(project\u003dNone, prog\u003dNone, extension\u003d\u0027.conf\u0027):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAQn%2F%2Fvsw%3D","line":85,"updated":"2013-07-24 01:21:58.000000000","message":"You could write this as [i for i in iterable if pred(i)] : no need for version checking.","commit_id":"14300070ce6f6505882ef7ce3d0fcbf3c00ca1fb"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"85720aa2ae7e371a668ee05c89121963fbbecf24","unresolved":false,"context_lines":[{"line_number":101,"context_line":"      /etc/${project}/"},{"line_number":102,"context_line":"      /etc/"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    We return an absolute path for (at most) one of each the default config"},{"line_number":105,"context_line":"    files, for the topmost directory it exists in."},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    For example, if project\u003dfoo, prog\u003dbar and /etc/foo/foo.conf, /etc/bar.conf"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAQn%2F%2FvsU%3D","line":104,"updated":"2013-07-24 01:21:58.000000000","message":"Missing \u0027of\u0027","commit_id":"14300070ce6f6505882ef7ce3d0fcbf3c00ca1fb"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"85720aa2ae7e371a668ee05c89121963fbbecf24","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        \"\"\"Include the name.\"\"\""},{"line_number":149,"context_line":"        return \"VersionInfo(%s:%s)\" % (self.package, self.version_string())"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    def _load_from_setup_cfg(self):"},{"line_number":152,"context_line":"        import d2to1.util"},{"line_number":153,"context_line":"        parsed_cfg \u003d d2to1.util.cfg_to_args()"},{"line_number":154,"context_line":"        self.vendor \u003d parsed_cfg[\u0027author\u0027]"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAQn%2F%2FvsM%3D","line":151,"updated":"2013-07-24 01:21:58.000000000","message":"This is an antipattern IME: better to have:\n - the object with business logic\n - one or more things that know how to parse and pass in or update the object\n - one or more things that know how to export data.","commit_id":"14300070ce6f6505882ef7ce3d0fcbf3c00ca1fb"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"85720aa2ae7e371a668ee05c89121963fbbecf24","unresolved":false,"context_lines":[{"line_number":243,"context_line":""},{"line_number":244,"context_line":"        return self.version"},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"    def vendor_string(self):"},{"line_number":247,"context_line":"        self._load_vendor_strings()"},{"line_number":248,"context_line":"        return self.vendor"},{"line_number":249,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAQn%2F%2FvsI%3D","line":246,"updated":"2013-07-24 01:21:58.000000000","message":"Is this here just to permit late-loading? see above about anti patterns, but if it is needed a @cached property would be better.","commit_id":"14300070ce6f6505882ef7ce3d0fcbf3c00ca1fb"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"def06661e00626c176ee62729828e8196d108955","unresolved":false,"context_lines":[{"line_number":16,"context_line":""},{"line_number":17,"context_line":"\"\"\""},{"line_number":18,"context_line":"Utilities for consuming the version from pkg_resources."},{"line_number":19,"context_line":"\"\"\""},{"line_number":20,"context_line":"import os"},{"line_number":21,"context_line":"import sys"},{"line_number":22,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2Bikk%3D","line":19,"updated":"2013-11-24 19:51:58.000000000","message":"Missing blank line after the docstring.","commit_id":"ad25b0ea7bf56447a11b68250428875fcdb26aa6"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"def06661e00626c176ee62729828e8196d108955","unresolved":false,"context_lines":[{"line_number":19,"context_line":"\"\"\""},{"line_number":20,"context_line":"import os"},{"line_number":21,"context_line":"import sys"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"try:"},{"line_number":24,"context_line":"    import ConfigParser as configparser"},{"line_number":25,"context_line":"except ImportError:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2Biko%3D","line":22,"updated":"2013-11-24 19:51:58.000000000","message":"No blank line here - this is all std library so far.","commit_id":"ad25b0ea7bf56447a11b68250428875fcdb26aa6"}]}
