)]}'
{"designate/objects/__init__.py":[{"author":{"_account_id":8094,"name":"Vinod Mangalpally","email":"mrvinod@outlook.com","username":"vinodmr"},"change_message_id":"7a22f82891e4288d591705b0d1bd8bdbc4abd8ae","unresolved":false,"context_lines":[{"line_number":19,"context_line":"# F401 \u0027Tld\u0027 imported but unused"},{"line_number":20,"context_line":"_designate_objects \u003d __import__(\u0027designate.objects.tld\u0027, globals(), locals(),"},{"line_number":21,"context_line":"                                [\u0027Tld\u0027], -1)"},{"line_number":22,"context_line":"Tld \u003d _designate_objects.Tld"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F9hsM%3D","line":22,"updated":"2014-04-03 22:20:00.000000000","message":"Is there a way to do this more elegantly without triggering the flake8 issue?","commit_id":"aec58d63edf8fd5223a041c363ae6c3b526aad26"}],"designate/objects/base.py":[{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"e5d6fc0070792cc27723f7557c16fb3809cbcc47","unresolved":false,"context_lines":[{"line_number":18,"context_line":"    BASE_FIELDS \u003d (\u0027id\u0027, \u0027created_at\u0027, \u0027updated_at\u0027, \u0027version\u0027)"},{"line_number":19,"context_line":"    FIELDS \u003d []"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"    def __init__(self, cls):"},{"line_number":22,"context_line":"        self._fieldnames \u003d []"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"        # The following check is to ensure that Tenant does not have the"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAW3%2F%2Fpms%3D","line":21,"updated":"2014-04-11 12:26:30.000000000","message":"I\u0027m thinking we should change this to:\n\n    class BaseObject(object):\n        @classmethod\n        def from_sqla(cls, obj):\n            \"\"\"\n            Convert from a SQLA Model to a Designate Object\n\n            Eventually, when we move from SQLA ORM to SQLA Core, this can be\n            removed.\n            \"\"\"\n            fields \u003d {}\n\n            for fieldname in cls.FIELDS + cls.BASE_FIELDS:\n                if hasattr(obj, fieldname):\n                    fields[fieldname] \u003d getattr(obj, fieldname)\n\n            return cls(**fields)\n\n        def __init__(self, **kwargs):\n            self._fieldnames \u003d cls.FIELDS + cls.BASE_FIELDS\n\n            for name, value in kwargs.items():\n                if name in self._fieldnames:\n                    setattr(self, name, value)\n\nMy reasoning being that, now the Objects behave more naturally:\n\n   domain \u003d Domain(name\u003d\u0027example.com.\u0027, email\u003d\u0027foo@bar.com\u0027)","commit_id":"979b058e6fa1966ee373ec97e7a260282dbb79fc"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"922b7ab7bdd8e8636fffca9f72ae277afa6361f1","unresolved":false,"context_lines":[{"line_number":18,"context_line":"    BASE_FIELDS \u003d (\u0027id\u0027, \u0027created_at\u0027, \u0027updated_at\u0027, \u0027version\u0027)"},{"line_number":19,"context_line":"    FIELDS \u003d []"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"    def __init__(self, cls):"},{"line_number":22,"context_line":"        self._fieldnames \u003d []"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"        # The following check is to ensure that Tenant does not have the"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAW3%2F%2FpI0%3D","line":21,"in_reply_to":"AAAAW3%2F%2Fpms%3D","updated":"2014-04-11 13:20:23.000000000","message":"Also, we should raise an TypeError when we get a value in kwargs that is invalid:\n\ne.g.:\n\n    \u003e\u003e\u003e datetime.datetime(year\u003d2000,month\u003d10,day\u003d10,foo\u003d1)\n    Traceback (most recent call last):\n      File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\n    TypeError: \u0027foo\u0027 is an invalid keyword argument for this function","commit_id":"979b058e6fa1966ee373ec97e7a260282dbb79fc"}],"designate/objects/blacklist.py":[{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"86a0956f3897c9fd81ac544277fe5224061608b1","unresolved":false,"context_lines":[{"line_number":19,"context_line":"    FIELDS \u003d [\u0027pattern\u0027, \u0027description\u0027]"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"    def __init__(self, cls):"},{"line_number":22,"context_line":"        super(Blacklist, self).__init__(cls)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAW3%2F%2FpmY%3D","line":22,"updated":"2014-04-11 12:27:02.000000000","message":"All these can be skipped, if there not doing anything other than calling the parent","commit_id":"979b058e6fa1966ee373ec97e7a260282dbb79fc"}]}
