{"action":"created","comment":{"url":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/pulls/comments/150397705","pull_request_review_id":75946405,"id":150397705,"diff_hunk":"@@ -0,0 +1,141 @@\n+#!/usr/bin/env python3\n+\n+# coding=utf-8\n+#\n+# This file is part of Hypothesis, which may be found at\n+# https://github.com/HypothesisWorks/hypothesis-python\n+#\n+# Most of this work is copyright (C) 2013-2017 David R. MacIver\n+# (david@drmaciver.com), but it contains contributions by others. See\n+# CONTRIBUTING.rst for a full list of people who may hold copyright, and\n+# consult the git log if you need to determine who owns an individual\n+# contribution.\n+#\n+# This Source Code Form is subject to the terms of the Mozilla Public License,\n+# v. 2.0. If a copy of the MPL was not distributed with this file, You can\n+# obtain one at http://mozilla.org/MPL/2.0/.\n+#\n+# END HEADER\n+\n+from __future__ import division, print_function, absolute_import\n+\n+import re\n+import sys\n+from subprocess import PIPE, run\n+\n+import hypothesistooling as tools\n+\n+\n+class FailingExample(object):\n+\n+    def __init__(self, chunk):\n+        \"\"\"Turn a chunk of text into an object representing the test.\"\"\"\n+        location, *lines = [l + '\\n' for l in chunk.split('\\n') if l.strip()]\n+        self.location = location.strip()\n+        pattern = 'File \"(.+?)\", line (\\d+?), in .+'\n+        self.file, line = re.match(pattern, self.location).groups()\n+        self.line = int(line) + 1\n+        got = lines.index('Got:\\n')\n+        self.expected_lines = lines[lines.index('Expected:\\n') + 1:got]\n+        self.got_lines = lines[got + 1:]\n+\n+    def __repr__(self):\n+        return '{}\\nExpected: {!r:.60}\\nGot:      {!r:.60}'.format(\n+            self.location, self.expected, self.got)\n+\n+\n+def run_doctests():","path":"scripts/fix_doctests.py","position":49,"original_position":47,"commit_id":"bf1e9a908c62a52865cf35dc61e95d6da2e62960","original_commit_id":"addee86d827e0176742de1eb806131d9e5ecf7d9","user":{"login":"Zac-HD","id":12229877,"avatar_url":"https://avatars1.githubusercontent.com/u/12229877?v=4","gravatar_id":"","url":"https://api.github.com/users/Zac-HD","html_url":"https://github.com/Zac-HD","followers_url":"https://api.github.com/users/Zac-HD/followers","following_url":"https://api.github.com/users/Zac-HD/following{/other_user}","gists_url":"https://api.github.com/users/Zac-HD/gists{/gist_id}","starred_url":"https://api.github.com/users/Zac-HD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zac-HD/subscriptions","organizations_url":"https://api.github.com/users/Zac-HD/orgs","repos_url":"https://api.github.com/users/Zac-HD/repos","events_url":"https://api.github.com/users/Zac-HD/events{/privacy}","received_events_url":"https://api.github.com/users/Zac-HD/received_events","type":"User","site_admin":false},"body":"Hmm, I actually could do a pre-processing pass to establish the true initial location, and then yes.  Time for some less hacky, more considered data processing 😄","created_at":"2017-11-12T01:07:14Z","updated_at":"2017-11-12T01:07:14Z","html_url":"https://github.com/HypothesisWorks/hypothesis-python/pull/962#discussion_r150397705","pull_request_url":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/pulls/962","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/pulls/comments/150397705"},"html":{"href":"https://github.com/HypothesisWorks/hypothesis-python/pull/962#discussion_r150397705"},"pull_request":{"href":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/pulls/962"}},"in_reply_to_id":149139414},"pull_request":{"url":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/pulls/962","id":150724819,"html_url":"https://github.com/HypothesisWorks/hypothesis-python/pull/962","diff_url":"https://github.com/HypothesisWorks/hypothesis-python/pull/962.diff","patch_url":"https://github.com/HypothesisWorks/hypothesis-python/pull/962.patch","issue_url":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/issues/962","number":962,"state":"open","locked":false,"title":"Get doctests working again; script to fix broken doctests","user":{"login":"Zac-HD","id":12229877,"avatar_url":"https://avatars1.githubusercontent.com/u/12229877?v=4","gravatar_id":"","url":"https://api.github.com/users/Zac-HD","html_url":"https://github.com/Zac-HD","followers_url":"https://api.github.com/users/Zac-HD/followers","following_url":"https://api.github.com/users/Zac-HD/following{/other_user}","gists_url":"https://api.github.com/users/Zac-HD/gists{/gist_id}","starred_url":"https://api.github.com/users/Zac-HD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zac-HD/subscriptions","organizations_url":"https://api.github.com/users/Zac-HD/orgs","repos_url":"https://api.github.com/users/Zac-HD/repos","events_url":"https://api.github.com/users/Zac-HD/events{/privacy}","received_events_url":"https://api.github.com/users/Zac-HD/received_events","type":"User","site_admin":false},"body":"Closes #711, via a series of terrible hacks that work well enough for now (see comments in source, or just read source, for details).  Notably there are some not-too-rare cases that are not covered; but as an aid to manual updates I think it's good enough - I certainly don't want to spend longer writing it than is saved by its use!","created_at":"2017-11-05T14:28:06Z","updated_at":"2017-11-12T01:07:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3c0cab0765a41a776d456c5b6980e4d436e8e291","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/pulls/962/commits","review_comments_url":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/pulls/962/comments","review_comment_url":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/pulls/comments{/number}","comments_url":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/issues/962/comments","statuses_url":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/statuses/bf1e9a908c62a52865cf35dc61e95d6da2e62960","head":{"label":"Zac-HD:check-doc-examples","ref":"check-doc-examples","sha":"bf1e9a908c62a52865cf35dc61e95d6da2e62960","user":{"login":"Zac-HD","id":12229877,"avatar_url":"https://avatars1.githubusercontent.com/u/12229877?v=4","gravatar_id":"","url":"https://api.github.com/users/Zac-HD","html_url":"https://github.com/Zac-HD","followers_url":"https://api.github.com/users/Zac-HD/followers","following_url":"https://api.github.com/users/Zac-HD/following{/other_user}","gists_url":"https://api.github.com/users/Zac-HD/gists{/gist_id}","starred_url":"https://api.github.com/users/Zac-HD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zac-HD/subscriptions","organizations_url":"https://api.github.com/users/Zac-HD/orgs","repos_url":"https://api.github.com/users/Zac-HD/repos","events_url":"https://api.github.com/users/Zac-HD/events{/privacy}","received_events_url":"https://api.github.com/users/Zac-HD/received_events","type":"User","site_admin":false},"repo":{"id":82669519,"name":"hypothesis-python","full_name":"Zac-HD/hypothesis-python","owner":{"login":"Zac-HD","id":12229877,"avatar_url":"https://avatars1.githubusercontent.com/u/12229877?v=4","gravatar_id":"","url":"https://api.github.com/users/Zac-HD","html_url":"https://github.com/Zac-HD","followers_url":"https://api.github.com/users/Zac-HD/followers","following_url":"https://api.github.com/users/Zac-HD/following{/other_user}","gists_url":"https://api.github.com/users/Zac-HD/gists{/gist_id}","starred_url":"https://api.github.com/users/Zac-HD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zac-HD/subscriptions","organizations_url":"https://api.github.com/users/Zac-HD/orgs","repos_url":"https://api.github.com/users/Zac-HD/repos","events_url":"https://api.github.com/users/Zac-HD/events{/privacy}","received_events_url":"https://api.github.com/users/Zac-HD/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Zac-HD/hypothesis-python","description":"Advanced property-based (QuickCheck-like) testing for Python","fork":true,"url":"https://api.github.com/repos/Zac-HD/hypothesis-python","forks_url":"https://api.github.com/repos/Zac-HD/hypothesis-python/forks","keys_url":"https://api.github.com/repos/Zac-HD/hypothesis-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Zac-HD/hypothesis-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Zac-HD/hypothesis-python/teams","hooks_url":"https://api.github.com/repos/Zac-HD/hypothesis-python/hooks","issue_events_url":"https://api.github.com/repos/Zac-HD/hypothesis-python/issues/events{/number}","events_url":"https://api.github.com/repos/Zac-HD/hypothesis-python/events","assignees_url":"https://api.github.com/repos/Zac-HD/hypothesis-python/assignees{/user}","branches_url":"https://api.github.com/repos/Zac-HD/hypothesis-python/branches{/branch}","tags_url":"https://api.github.com/repos/Zac-HD/hypothesis-python/tags","blobs_url":"https://api.github.com/repos/Zac-HD/hypothesis-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Zac-HD/hypothesis-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Zac-HD/hypothesis-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/Zac-HD/hypothesis-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Zac-HD/hypothesis-python/statuses/{sha}","languages_url":"https://api.github.com/repos/Zac-HD/hypothesis-python/languages","stargazers_url":"https://api.github.com/repos/Zac-HD/hypothesis-python/stargazers","contributors_url":"https://api.github.com/repos/Zac-HD/hypothesis-python/contributors","subscribers_url":"https://api.github.com/repos/Zac-HD/hypothesis-python/subscribers","subscription_url":"https://api.github.com/repos/Zac-HD/hypothesis-python/subscription","commits_url":"https://api.github.com/repos/Zac-HD/hypothesis-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/Zac-HD/hypothesis-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/Zac-HD/hypothesis-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/Zac-HD/hypothesis-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/Zac-HD/hypothesis-python/contents/{+path}","compare_url":"https://api.github.com/repos/Zac-HD/hypothesis-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Zac-HD/hypothesis-python/merges","archive_url":"https://api.github.com/repos/Zac-HD/hypothesis-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Zac-HD/hypothesis-python/downloads","issues_url":"https://api.github.com/repos/Zac-HD/hypothesis-python/issues{/number}","pulls_url":"https://api.github.com/repos/Zac-HD/hypothesis-python/pulls{/number}","milestones_url":"https://api.github.com/repos/Zac-HD/hypothesis-python/milestones{/number}","notifications_url":"https://api.github.com/repos/Zac-HD/hypothesis-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Zac-HD/hypothesis-python/labels{/name}","releases_url":"https://api.github.com/repos/Zac-HD/hypothesis-python/releases{/id}","deployments_url":"https://api.github.com/repos/Zac-HD/hypothesis-python/deployments","created_at":"2017-02-21T10:56:41Z","updated_at":"2017-02-21T10:56:44Z","pushed_at":"2017-11-07T06:15:51Z","git_url":"git://github.com/Zac-HD/hypothesis-python.git","ssh_url":"git@github.com:Zac-HD/hypothesis-python.git","clone_url":"https://github.com/Zac-HD/hypothesis-python.git","svn_url":"https://github.com/Zac-HD/hypothesis-python","homepage":"http://hypothesis.works","size":8848,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"HypothesisWorks:master","ref":"master","sha":"5451326a402ef43d9eb794f3541ed35eb8cad20a","user":{"login":"HypothesisWorks","id":18481919,"avatar_url":"https://avatars1.githubusercontent.com/u/18481919?v=4","gravatar_id":"","url":"https://api.github.com/users/HypothesisWorks","html_url":"https://github.com/HypothesisWorks","followers_url":"https://api.github.com/users/HypothesisWorks/followers","following_url":"https://api.github.com/users/HypothesisWorks/following{/other_user}","gists_url":"https://api.github.com/users/HypothesisWorks/gists{/gist_id}","starred_url":"https://api.github.com/users/HypothesisWorks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HypothesisWorks/subscriptions","organizations_url":"https://api.github.com/users/HypothesisWorks/orgs","repos_url":"https://api.github.com/users/HypothesisWorks/repos","events_url":"https://api.github.com/users/HypothesisWorks/events{/privacy}","received_events_url":"https://api.github.com/users/HypothesisWorks/received_events","type":"Organization","site_admin":false},"repo":{"id":8685799,"name":"hypothesis-python","full_name":"HypothesisWorks/hypothesis-python","owner":{"login":"HypothesisWorks","id":18481919,"avatar_url":"https://avatars1.githubusercontent.com/u/18481919?v=4","gravatar_id":"","url":"https://api.github.com/users/HypothesisWorks","html_url":"https://github.com/HypothesisWorks","followers_url":"https://api.github.com/users/HypothesisWorks/followers","following_url":"https://api.github.com/users/HypothesisWorks/following{/other_user}","gists_url":"https://api.github.com/users/HypothesisWorks/gists{/gist_id}","starred_url":"https://api.github.com/users/HypothesisWorks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HypothesisWorks/subscriptions","organizations_url":"https://api.github.com/users/HypothesisWorks/orgs","repos_url":"https://api.github.com/users/HypothesisWorks/repos","events_url":"https://api.github.com/users/HypothesisWorks/events{/privacy}","received_events_url":"https://api.github.com/users/HypothesisWorks/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/HypothesisWorks/hypothesis-python","description":"Advanced property-based (QuickCheck-like) testing for Python","fork":false,"url":"https://api.github.com/repos/HypothesisWorks/hypothesis-python","forks_url":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/forks","keys_url":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/teams","hooks_url":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/hooks","issue_events_url":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/issues/events{/number}","events_url":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/events","assignees_url":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/assignees{/user}","branches_url":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/branches{/branch}","tags_url":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/tags","blobs_url":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/statuses/{sha}","languages_url":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/languages","stargazers_url":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/stargazers","contributors_url":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/contributors","subscribers_url":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/subscribers","subscription_url":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/subscription","commits_url":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/contents/{+path}","compare_url":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/merges","archive_url":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/downloads","issues_url":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/issues{/number}","pulls_url":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/pulls{/number}","milestones_url":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/milestones{/number}","notifications_url":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/labels{/name}","releases_url":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/releases{/id}","deployments_url":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/deployments","created_at":"2013-03-10T13:51:19Z","updated_at":"2017-11-11T19:05:03Z","pushed_at":"2017-11-11T16:01:28Z","git_url":"git://github.com/HypothesisWorks/hypothesis-python.git","ssh_url":"git@github.com:HypothesisWorks/hypothesis-python.git","clone_url":"https://github.com/HypothesisWorks/hypothesis-python.git","svn_url":"https://github.com/HypothesisWorks/hypothesis-python","homepage":"http://hypothesis.works","size":8886,"stargazers_count":2289,"watchers_count":2289,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":205,"mirror_url":null,"archived":false,"open_issues_count":116,"forks":205,"open_issues":116,"watchers":2289,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/pulls/962"},"html":{"href":"https://github.com/HypothesisWorks/hypothesis-python/pull/962"},"issue":{"href":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/issues/962"},"comments":{"href":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/issues/962/comments"},"review_comments":{"href":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/pulls/962/comments"},"review_comment":{"href":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/pulls/962/commits"},"statuses":{"href":"https://api.github.com/repos/HypothesisWorks/hypothesis-python/statuses/bf1e9a908c62a52865cf35dc61e95d6da2e62960"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"Zac-HD"}}