prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Fix documentation main page's header
  The header is gone:
  <img width="1032" alt="2018-10-03 0 18 01" src="https://user-images.githubusercontent.com/4660275/46377643-d0ce1080-c6a1-11e8-950b-d2d0c515dee1.png">
  
  
  </issue>
  <code>
  [start of wemake_python_styleguide/visitors/ast/numbers.py]
  1 # -*- coding: utf-8 -*-
  2 
  3 import ast
  4 from typing import Optional
  5 
  6 from wemake_python_styleguide.constants import MAGIC_NUMBERS_WHITELIST
  7 from wemake_python_styleguide.violations.best_practices import (
  8     MagicNumberViolation,
  9 )
  10 from wemake_python_styleguide.visitors.base import BaseNodeVisitor
  11 
  12 
  13 class MagicNumberVisitor(BaseNodeVisitor):
  14     """Checks magic numbers used in the code."""
  15 
  16     _ALLOWED_PARENTS = (
  17         ast.Assign,
  18 
  19         # Constructor usages:
  20         ast.FunctionDef,
  21         ast.arguments,
  22 
  23         # Primitives:
  24         ast.List,
  25         ast.Dict,
  26         ast.Set,
  27         ast.Tuple,
  28     )
  29 
  30     _PROXY_PARENTS = (
  31         ast.UnaryOp,
  32     )
  33 
  34     def _get_real_parent(self, node: Optional[ast.AST]) -> Optional[ast.AST]:
  35         """
  36         Returns real number's parent.
  37 
  38         What can go wrong?
  39 
  40         1. Number can be negative: ``x = -1``,
  41           so ``1`` has ``UnaryOp`` as parent, but should return ``Assign``
  42 
  43         """
  44         parent = getattr(node, 'parent', None)
  45         if isinstance(parent, self._PROXY_PARENTS):
  46             return self._get_real_parent(parent)
  47         return parent
  48 
  49     def _check_is_magic(self, node: ast.Num) -> None:
  50         parent = self._get_real_parent(node)
  51         if isinstance(parent, self._ALLOWED_PARENTS):
  52             return
  53 
  54         if node.n in MAGIC_NUMBERS_WHITELIST:
  55             return
  56 
  57         if isinstance(node.n, int) and node.n <= 10:
  58             return
  59 
  60         self.add_violation(MagicNumberViolation(node, text=str(node.n)))
  61 
  62     def visit_Num(self, node: ast.Num) -> None:
  63         """
  64         Checks numbers not to be magic constants inside the code.
  65 
  66         Raises:
  67             MagicNumberViolation
  68 
  69         """
  70         self._check_is_magic(node)
  71         self.generic_visit(node)
  72
  [end of wemake_python_styleguide/visitors/ast/numbers.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/wemake_python_styleguide/visitors/ast/numbers.py b/wemake_python_styleguide/visitors/ast/numbers.py
  --- a/wemake_python_styleguide/visitors/ast/numbers.py
  +++ b/wemake_python_styleguide/visitors/ast/numbers.py
  @@ -27,6 +27,7 @@
           ast.Tuple,
       )
   
  +    # TODO: make consistent naming rules for class attributes:
       _PROXY_PARENTS = (
           ast.UnaryOp,
       )
  
verification_info: {"golden_diff": "diff --git a/wemake_python_styleguide/visitors/ast/numbers.py b/wemake_python_styleguide/visitors/ast/numbers.py\n--- a/wemake_python_styleguide/visitors/ast/numbers.py\n+++ b/wemake_python_styleguide/visitors/ast/numbers.py\n@@ -27,6 +27,7 @@\n         ast.Tuple,\n     )\n \n+    # TODO: make consistent naming rules for class attributes:\n     _PROXY_PARENTS = (\n         ast.UnaryOp,\n     )\n", "issue": "Fix documentation main page's header\nThe header is gone:\r\n<img width=\"1032\" alt=\"2018-10-03 0 18 01\" src=\"https://user-images.githubusercontent.com/4660275/46377643-d0ce1080-c6a1-11e8-950b-d2d0c515dee1.png\">\r\n\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\n\nimport ast\nfrom typing import Optional\n\nfrom wemake_python_styleguide.constants import MAGIC_NUMBERS_WHITELIST\nfrom wemake_python_styleguide.violations.best_practices import (\n    MagicNumberViolation,\n)\nfrom wemake_python_styleguide.visitors.base import BaseNodeVisitor\n\n\nclass MagicNumberVisitor(BaseNodeVisitor):\n    \"\"\"Checks magic numbers used in the code.\"\"\"\n\n    _ALLOWED_PARENTS = (\n        ast.Assign,\n\n        # Constructor usages:\n        ast.FunctionDef,\n        ast.arguments,\n\n        # Primitives:\n        ast.List,\n        ast.Dict,\n        ast.Set,\n        ast.Tuple,\n    )\n\n    _PROXY_PARENTS = (\n        ast.UnaryOp,\n    )\n\n    def _get_real_parent(self, node: Optional[ast.AST]) -> Optional[ast.AST]:\n        \"\"\"\n        Returns real number's parent.\n\n        What can go wrong?\n\n        1. Number can be negative: ``x = -1``,\n          so ``1`` has ``UnaryOp`` as parent, but should return ``Assign``\n\n        \"\"\"\n        parent = getattr(node, 'parent', None)\n        if isinstance(parent, self._PROXY_PARENTS):\n            return self._get_real_parent(parent)\n        return parent\n\n    def _check_is_magic(self, node: ast.Num) -> None:\n        parent = self._get_real_parent(node)\n        if isinstance(parent, self._ALLOWED_PARENTS):\n            return\n\n        if node.n in MAGIC_NUMBERS_WHITELIST:\n            return\n\n        if isinstance(node.n, int) and node.n <= 10:\n            return\n\n        self.add_violation(MagicNumberViolation(node, text=str(node.n)))\n\n    def visit_Num(self, node: ast.Num) -> None:\n        \"\"\"\n        Checks numbers not to be magic constants inside the code.\n\n        Raises:\n            MagicNumberViolation\n\n        \"\"\"\n        self._check_is_magic(node)\n        self.generic_visit(node)\n", "path": "wemake_python_styleguide/visitors/ast/numbers.py"}]}