prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Use of future functionality
  ### Description of the bug
  
  The `shutil.copytree` argument [`dirs_exist_ok`](https://docs.python.org/3/library/shutil.html#shutil.copytree) is only available in Python version 3.8+ but nf-core tool still support Python 3.7
  
  https://github.com/nf-core/tools/blob/b5400d84d307343353b6ab09aad204231f74fb0e/nf_core/modules/lint/module_changes.py#L28
  
  Two options: drop Python 3.7 support or change that code.
  
  
  </issue>
  <code>
  [start of nf_core/modules/lint/module_changes.py]
  1 """
  2 Check whether the content of a module has changed compared to the original repository
  3 """
  4 import shutil
  5 import tempfile
  6 from pathlib import Path
  7 
  8 from nf_core.modules.modules_differ import ModulesDiffer
  9 
  10 
  11 def module_changes(module_lint_object, module):
  12     """
  13     Checks whether installed nf-core modules have changed compared to the
  14     original repository
  15 
  16     Downloads the ``main.nf`` and ``meta.yml`` files for every module
  17     and compares them to the local copies
  18 
  19     If the module has a commit SHA entry in the ``modules.json``, the file content is
  20     compared against the files in the remote at this SHA.
  21 
  22     Only runs when linting a pipeline, not the modules repository
  23     """
  24     if module.is_patched:
  25         # If the module is patched, we need to apply
  26         # the patch in reverse before comparing with the remote
  27         tempdir = Path(tempfile.mkdtemp())
  28         shutil.copytree(module.module_dir, tempdir, dirs_exist_ok=True)
  29         try:
  30             new_lines = ModulesDiffer.try_apply_patch(
  31                 module.module_name, module_lint_object.modules_repo.fullname, module.patch_path, tempdir, reverse=True
  32             )
  33             for file, lines in new_lines.items():
  34                 with open(tempdir / file, "w") as fh:
  35                     fh.writelines(lines)
  36         except LookupError:
  37             # This error is already reported by module_patch, so just return
  38             return
  39     else:
  40         tempdir = module.module_dir
  41 
  42     for f, same in module_lint_object.modules_repo.module_files_identical(
  43         module.module_name, tempdir, module.git_sha
  44     ).items():
  45         if same:
  46             module.passed.append(
  47                 (
  48                     "check_local_copy",
  49                     "Local copy of module up to date",
  50                     f"{Path(module.module_dir, f)}",
  51                 )
  52             )
  53         else:
  54             module.failed.append(
  55                 (
  56                     "check_local_copy",
  57                     "Local copy of module does not match remote",
  58                     f"{Path(module.module_dir, f)}",
  59                 )
  60             )
  61
  [end of nf_core/modules/lint/module_changes.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/nf_core/modules/lint/module_changes.py b/nf_core/modules/lint/module_changes.py
  --- a/nf_core/modules/lint/module_changes.py
  +++ b/nf_core/modules/lint/module_changes.py
  @@ -25,7 +25,7 @@
           # If the module is patched, we need to apply
           # the patch in reverse before comparing with the remote
           tempdir = Path(tempfile.mkdtemp())
  -        shutil.copytree(module.module_dir, tempdir, dirs_exist_ok=True)
  +        shutil.copytree(module.module_dir, tempdir)
           try:
               new_lines = ModulesDiffer.try_apply_patch(
                   module.module_name, module_lint_object.modules_repo.fullname, module.patch_path, tempdir, reverse=True
  
verification_info: {"golden_diff": "diff --git a/nf_core/modules/lint/module_changes.py b/nf_core/modules/lint/module_changes.py\n--- a/nf_core/modules/lint/module_changes.py\n+++ b/nf_core/modules/lint/module_changes.py\n@@ -25,7 +25,7 @@\n         # If the module is patched, we need to apply\n         # the patch in reverse before comparing with the remote\n         tempdir = Path(tempfile.mkdtemp())\n-        shutil.copytree(module.module_dir, tempdir, dirs_exist_ok=True)\n+        shutil.copytree(module.module_dir, tempdir)\n         try:\n             new_lines = ModulesDiffer.try_apply_patch(\n                 module.module_name, module_lint_object.modules_repo.fullname, module.patch_path, tempdir, reverse=True\n", "issue": "Use of future functionality\n### Description of the bug\r\n\r\nThe `shutil.copytree` argument [`dirs_exist_ok`](https://docs.python.org/3/library/shutil.html#shutil.copytree) is only available in Python version 3.8+ but nf-core tool still support Python 3.7\r\n\r\nhttps://github.com/nf-core/tools/blob/b5400d84d307343353b6ab09aad204231f74fb0e/nf_core/modules/lint/module_changes.py#L28\r\n\r\nTwo options: drop Python 3.7 support or change that code.\r\n\n", "before_files": [{"content": "\"\"\"\nCheck whether the content of a module has changed compared to the original repository\n\"\"\"\nimport shutil\nimport tempfile\nfrom pathlib import Path\n\nfrom nf_core.modules.modules_differ import ModulesDiffer\n\n\ndef module_changes(module_lint_object, module):\n    \"\"\"\n    Checks whether installed nf-core modules have changed compared to the\n    original repository\n\n    Downloads the ``main.nf`` and ``meta.yml`` files for every module\n    and compares them to the local copies\n\n    If the module has a commit SHA entry in the ``modules.json``, the file content is\n    compared against the files in the remote at this SHA.\n\n    Only runs when linting a pipeline, not the modules repository\n    \"\"\"\n    if module.is_patched:\n        # If the module is patched, we need to apply\n        # the patch in reverse before comparing with the remote\n        tempdir = Path(tempfile.mkdtemp())\n        shutil.copytree(module.module_dir, tempdir, dirs_exist_ok=True)\n        try:\n            new_lines = ModulesDiffer.try_apply_patch(\n                module.module_name, module_lint_object.modules_repo.fullname, module.patch_path, tempdir, reverse=True\n            )\n            for file, lines in new_lines.items():\n                with open(tempdir / file, \"w\") as fh:\n                    fh.writelines(lines)\n        except LookupError:\n            # This error is already reported by module_patch, so just return\n            return\n    else:\n        tempdir = module.module_dir\n\n    for f, same in module_lint_object.modules_repo.module_files_identical(\n        module.module_name, tempdir, module.git_sha\n    ).items():\n        if same:\n            module.passed.append(\n                (\n                    \"check_local_copy\",\n                    \"Local copy of module up to date\",\n                    f\"{Path(module.module_dir, f)}\",\n                )\n            )\n        else:\n            module.failed.append(\n                (\n                    \"check_local_copy\",\n                    \"Local copy of module does not match remote\",\n                    f\"{Path(module.module_dir, f)}\",\n                )\n            )\n", "path": "nf_core/modules/lint/module_changes.py"}]}