prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  scripts as a single top-level point of project automation.
  Generally across the `encode` projects I've been using [GitHub's "Scripts to Rule Them All" pattern](https://github.blog/2015-06-30-scripts-to-rule-them-all/) as a consistent style for project testing, linting, publishing etc...
  
  It's benenficial from my POV, because it ends up that we can always just run `scripts/install`, or `scripts/test` from *any* project and expect that to perform the same kind of thing, even if we're using different tooling between projects. (eg. started adopting `nox` in some places, but not yet there accross the board.)
  
  I'd like to do the same with `httpx`, while still keeping the niceness of `nox` (So eg. reintroduce a `scripts/test`, `scripts/lint` and `scripts/publish`.) but figure it's worth raising this for discussion first.
  
  I'd also be quite keen on having a fast-feedback test suite being the default, with nox's run against multiple environments as an explicit case?
  
  Any general thoughts here or should I just dive in and take a crack at this?
  
  </issue>
  <code>
  [start of noxfile.py]
  1 import nox
  2 
  3 nox.options.stop_on_first_error = True
  4 nox.options.reuse_existing_virtualenvs = True
  5 nox.options.keywords = "not serve"
  6 
  7 source_files = ("httpx", "tools", "tests", "setup.py", "noxfile.py")
  8 
  9 
  10 @nox.session
  11 def lint(session):
  12     session.install(
  13         "--upgrade", "autoflake", "black", "flake8", "isort", "seed-isort-config"
  14     )
  15 
  16     session.run("autoflake", "--in-place", "--recursive", *source_files)
  17     session.run("seed-isort-config", "--application-directories=httpx")
  18     session.run("isort", "--project=httpx", "--recursive", "--apply", *source_files)
  19     session.run("black", "--target-version=py36", *source_files)
  20 
  21     check(session)
  22 
  23 
  24 @nox.session
  25 def check(session):
  26     session.install(
  27         "--upgrade", "black", "flake8", "flake8-bugbear", "flake8-pie", "isort", "mypy"
  28     )
  29 
  30     session.run("black", "--check", "--diff", "--target-version=py36", *source_files)
  31     session.run("flake8", *source_files)
  32     session.run("mypy", "httpx")
  33     session.run(
  34         "isort", "--check", "--diff", "--project=httpx", "--recursive", *source_files
  35     )
  36 
  37 
  38 @nox.session
  39 def docs(session):
  40     session.install("--upgrade", "mkdocs", "mkdocs-material", "mkautodoc>=0.1.0")
  41     session.install("-e", ".")
  42     session.run("mkdocs", "build")
  43 
  44 
  45 @nox.session(reuse_venv=True)
  46 def serve(session):
  47     session.install("--upgrade", "mkdocs", "mkdocs-material")
  48 
  49     session.run("mkdocs", "serve")
  50 
  51 
  52 @nox.session(python=["3.6", "3.7", "3.8"])
  53 def test(session):
  54     session.install("--upgrade", "-r", "test-requirements.txt")
  55     session.run("python", "-m", "pytest", *session.posargs)
  56
  [end of noxfile.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/noxfile.py b/noxfile.py
  deleted file mode 100644
  --- a/noxfile.py
  +++ /dev/null
  @@ -1,55 +0,0 @@
  -import nox
  -
  -nox.options.stop_on_first_error = True
  -nox.options.reuse_existing_virtualenvs = True
  -nox.options.keywords = "not serve"
  -
  -source_files = ("httpx", "tools", "tests", "setup.py", "noxfile.py")
  -
  -
  -@nox.session
  -def lint(session):
  -    session.install(
  -        "--upgrade", "autoflake", "black", "flake8", "isort", "seed-isort-config"
  -    )
  -
  -    session.run("autoflake", "--in-place", "--recursive", *source_files)
  -    session.run("seed-isort-config", "--application-directories=httpx")
  -    session.run("isort", "--project=httpx", "--recursive", "--apply", *source_files)
  -    session.run("black", "--target-version=py36", *source_files)
  -
  -    check(session)
  -
  -
  -@nox.session
  -def check(session):
  -    session.install(
  -        "--upgrade", "black", "flake8", "flake8-bugbear", "flake8-pie", "isort", "mypy"
  -    )
  -
  -    session.run("black", "--check", "--diff", "--target-version=py36", *source_files)
  -    session.run("flake8", *source_files)
  -    session.run("mypy", "httpx")
  -    session.run(
  -        "isort", "--check", "--diff", "--project=httpx", "--recursive", *source_files
  -    )
  -
  -
  -@nox.session
  -def docs(session):
  -    session.install("--upgrade", "mkdocs", "mkdocs-material", "mkautodoc>=0.1.0")
  -    session.install("-e", ".")
  -    session.run("mkdocs", "build")
  -
  -
  -@nox.session(reuse_venv=True)
  -def serve(session):
  -    session.install("--upgrade", "mkdocs", "mkdocs-material")
  -
  -    session.run("mkdocs", "serve")
  -
  -
  -@nox.session(python=["3.6", "3.7", "3.8"])
  -def test(session):
  -    session.install("--upgrade", "-r", "test-requirements.txt")
  -    session.run("python", "-m", "pytest", *session.posargs)
  
verification_info: {"golden_diff": "diff --git a/noxfile.py b/noxfile.py\ndeleted file mode 100644\n--- a/noxfile.py\n+++ /dev/null\n@@ -1,55 +0,0 @@\n-import nox\n-\n-nox.options.stop_on_first_error = True\n-nox.options.reuse_existing_virtualenvs = True\n-nox.options.keywords = \"not serve\"\n-\n-source_files = (\"httpx\", \"tools\", \"tests\", \"setup.py\", \"noxfile.py\")\n-\n-\n-@nox.session\n-def lint(session):\n-    session.install(\n-        \"--upgrade\", \"autoflake\", \"black\", \"flake8\", \"isort\", \"seed-isort-config\"\n-    )\n-\n-    session.run(\"autoflake\", \"--in-place\", \"--recursive\", *source_files)\n-    session.run(\"seed-isort-config\", \"--application-directories=httpx\")\n-    session.run(\"isort\", \"--project=httpx\", \"--recursive\", \"--apply\", *source_files)\n-    session.run(\"black\", \"--target-version=py36\", *source_files)\n-\n-    check(session)\n-\n-\n-@nox.session\n-def check(session):\n-    session.install(\n-        \"--upgrade\", \"black\", \"flake8\", \"flake8-bugbear\", \"flake8-pie\", \"isort\", \"mypy\"\n-    )\n-\n-    session.run(\"black\", \"--check\", \"--diff\", \"--target-version=py36\", *source_files)\n-    session.run(\"flake8\", *source_files)\n-    session.run(\"mypy\", \"httpx\")\n-    session.run(\n-        \"isort\", \"--check\", \"--diff\", \"--project=httpx\", \"--recursive\", *source_files\n-    )\n-\n-\n-@nox.session\n-def docs(session):\n-    session.install(\"--upgrade\", \"mkdocs\", \"mkdocs-material\", \"mkautodoc>=0.1.0\")\n-    session.install(\"-e\", \".\")\n-    session.run(\"mkdocs\", \"build\")\n-\n-\n-@nox.session(reuse_venv=True)\n-def serve(session):\n-    session.install(\"--upgrade\", \"mkdocs\", \"mkdocs-material\")\n-\n-    session.run(\"mkdocs\", \"serve\")\n-\n-\n-@nox.session(python=[\"3.6\", \"3.7\", \"3.8\"])\n-def test(session):\n-    session.install(\"--upgrade\", \"-r\", \"test-requirements.txt\")\n-    session.run(\"python\", \"-m\", \"pytest\", *session.posargs)\n", "issue": "scripts as a single top-level point of project automation.\nGenerally across the `encode` projects I've been using [GitHub's \"Scripts to Rule Them All\" pattern](https://github.blog/2015-06-30-scripts-to-rule-them-all/) as a consistent style for project testing, linting, publishing etc...\r\n\r\nIt's benenficial from my POV, because it ends up that we can always just run `scripts/install`, or `scripts/test` from *any* project and expect that to perform the same kind of thing, even if we're using different tooling between projects. (eg. started adopting `nox` in some places, but not yet there accross the board.)\r\n\r\nI'd like to do the same with `httpx`, while still keeping the niceness of `nox` (So eg. reintroduce a `scripts/test`, `scripts/lint` and `scripts/publish`.) but figure it's worth raising this for discussion first.\r\n\r\nI'd also be quite keen on having a fast-feedback test suite being the default, with nox's run against multiple environments as an explicit case?\r\n\r\nAny general thoughts here or should I just dive in and take a crack at this?\n", "before_files": [{"content": "import nox\n\nnox.options.stop_on_first_error = True\nnox.options.reuse_existing_virtualenvs = True\nnox.options.keywords = \"not serve\"\n\nsource_files = (\"httpx\", \"tools\", \"tests\", \"setup.py\", \"noxfile.py\")\n\n\n@nox.session\ndef lint(session):\n    session.install(\n        \"--upgrade\", \"autoflake\", \"black\", \"flake8\", \"isort\", \"seed-isort-config\"\n    )\n\n    session.run(\"autoflake\", \"--in-place\", \"--recursive\", *source_files)\n    session.run(\"seed-isort-config\", \"--application-directories=httpx\")\n    session.run(\"isort\", \"--project=httpx\", \"--recursive\", \"--apply\", *source_files)\n    session.run(\"black\", \"--target-version=py36\", *source_files)\n\n    check(session)\n\n\n@nox.session\ndef check(session):\n    session.install(\n        \"--upgrade\", \"black\", \"flake8\", \"flake8-bugbear\", \"flake8-pie\", \"isort\", \"mypy\"\n    )\n\n    session.run(\"black\", \"--check\", \"--diff\", \"--target-version=py36\", *source_files)\n    session.run(\"flake8\", *source_files)\n    session.run(\"mypy\", \"httpx\")\n    session.run(\n        \"isort\", \"--check\", \"--diff\", \"--project=httpx\", \"--recursive\", *source_files\n    )\n\n\n@nox.session\ndef docs(session):\n    session.install(\"--upgrade\", \"mkdocs\", \"mkdocs-material\", \"mkautodoc>=0.1.0\")\n    session.install(\"-e\", \".\")\n    session.run(\"mkdocs\", \"build\")\n\n\n@nox.session(reuse_venv=True)\ndef serve(session):\n    session.install(\"--upgrade\", \"mkdocs\", \"mkdocs-material\")\n\n    session.run(\"mkdocs\", \"serve\")\n\n\n@nox.session(python=[\"3.6\", \"3.7\", \"3.8\"])\ndef test(session):\n    session.install(\"--upgrade\", \"-r\", \"test-requirements.txt\")\n    session.run(\"python\", \"-m\", \"pytest\", *session.posargs)\n", "path": "noxfile.py"}]}