GitHub PullRequestReviewCommentEvent at 2014-01-23 20:48:44
Repository: OTM2
Actor: maurizi
Payload: {"comment":{"url":"https://api.github.com/repos/azavea/OTM2/pulls/comments/9129141","id":9129141,"diff_hunk":"@@ -1242,3 +1213,27 @@ def apply_adjustment(audit):\n @receiver(post_save, sender=Audit)\n def audit_presave_actions(sender, instance, **kwargs):\n     ReputationMetric.apply_adjustment(instance)\n+\n+\n+def _get_model_class(class_dict, cls, model_name):\n+    \"\"\"\n+    Convert a model name (as a string) into the model class\n+    \"\"\"\n+    if model_name.startswith('udf:'):\n+        from udf import UserDefinedCollectionValue\n+        return UserDefinedCollectionValue\n+\n+    if not any(class_dict):","path":"opentreemap/treemap/audit.py","position":123,"original_position":123,"commit_id":"d0246458af5dd7f032cbc0504991424a1d5fddea","original_commit_id":"d0246458af5dd7f032cbc0504991424a1d5fddea","user":{"login":"maurizi","id":4432106,"avatar_url":"https://gravatar.com/avatar/846d2ec7efaf249ea46484f423ed1be7?d=https%3A%2F%2Fidenticons.github.com%2F2213ab6021ec9b32d073ce50ce9e381c.png&r=x","gravatar_id":"846d2ec7efaf249ea46484f423ed1be7","url":"https://api.github.com/users/maurizi","html_url":"https://github.com/maurizi","followers_url":"https://api.github.com/users/maurizi/followers","following_url":"https://api.github.com/users/maurizi/following{/other_user}","gists_url":"https://api.github.com/users/maurizi/gists{/gist_id}","starred_url":"https://api.github.com/users/maurizi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maurizi/subscriptions","organizations_url":"https://api.github.com/users/maurizi/orgs","repos_url":"https://api.github.com/users/maurizi/repos","events_url":"https://api.github.com/users/maurizi/events{/privacy}","received_events_url":"https://api.github.com/users/maurizi/received_events","type":"User","site_admin":false},"body":"I believe it would be more idomatic Python to simply say `if not class_dict:`","created_at":"2014-01-23T20:48:44Z","updated_at":"2014-01-23T20:48:44Z","html_url":"https://github.com/azavea/OTM2/pull/1041#discussion_r9129141","pull_request_url":"https://api.github.com/repos/azavea/OTM2/pulls/1041","_links":{"self":{"href":"https://api.github.com/repos/azavea/OTM2/pulls/comments/9129141"},"html":{"href":"https://github.com/azavea/OTM2/pull/1041#discussion_r9129141"},"pull_request":{"href":"https://api.github.com/repos/azavea/OTM2/pulls/1041"}}}}