prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  TypeError while instantiating LoggingHandler (2.6)
  I assume this is new-style vs old-style classes being grumpy?
  
  ```
  >>> from pre_commit.logging_handler import LoggingHandler
  >>> LoggingHandler(True)
  Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File ".../py_env/lib/python2.6/site-packages/pre_commit/logging_handler.py", line 19, in __init__
      super(LoggingHandler, self).__init__()
  TypeError: super() argument 1 must be type, not classobj
  ```
  
  
  </issue>
  <code>
  [start of pre_commit/logging_handler.py]
  1 
  2 from __future__ import print_function
  3 
  4 import logging
  5 
  6 from pre_commit import color
  7 
  8 
  9 LOG_LEVEL_COLORS = {
  10     'DEBUG': '',
  11     'INFO': '',
  12     'WARNING': color.YELLOW,
  13     'ERROR': color.RED,
  14 }
  15 
  16 
  17 class LoggingHandler(logging.Handler):
  18     def __init__(self, use_color):
  19         super(LoggingHandler, self).__init__()
  20         self.use_color = use_color
  21 
  22     def emit(self, record):
  23         print(
  24             u'{0}{1}'.format(
  25                 color.format_color(
  26                     '[{0}]'.format(record.levelname),
  27                     LOG_LEVEL_COLORS[record.levelname],
  28                     self.use_color,
  29                 ) + ' ' if record.levelno >= logging.WARNING else '',
  30                 record.getMessage(),
  31             )
  32         )
  33
  [end of pre_commit/logging_handler.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/pre_commit/logging_handler.py b/pre_commit/logging_handler.py
  --- a/pre_commit/logging_handler.py
  +++ b/pre_commit/logging_handler.py
  @@ -16,7 +16,7 @@
   
   class LoggingHandler(logging.Handler):
       def __init__(self, use_color):
  -        super(LoggingHandler, self).__init__()
  +        logging.Handler.__init__(self)
           self.use_color = use_color
   
       def emit(self, record):
  
verification_info: {"golden_diff": "diff --git a/pre_commit/logging_handler.py b/pre_commit/logging_handler.py\n--- a/pre_commit/logging_handler.py\n+++ b/pre_commit/logging_handler.py\n@@ -16,7 +16,7 @@\n \n class LoggingHandler(logging.Handler):\n     def __init__(self, use_color):\n-        super(LoggingHandler, self).__init__()\n+        logging.Handler.__init__(self)\n         self.use_color = use_color\n \n     def emit(self, record):\n", "issue": "TypeError while instantiating LoggingHandler (2.6)\nI assume this is new-style vs old-style classes being grumpy?\n\n```\n>>> from pre_commit.logging_handler import LoggingHandler\n>>> LoggingHandler(True)\nTraceback (most recent call last):\n  File \"<stdin>\", line 1, in <module>\n  File \".../py_env/lib/python2.6/site-packages/pre_commit/logging_handler.py\", line 19, in __init__\n    super(LoggingHandler, self).__init__()\nTypeError: super() argument 1 must be type, not classobj\n```\n\n", "before_files": [{"content": "\nfrom __future__ import print_function\n\nimport logging\n\nfrom pre_commit import color\n\n\nLOG_LEVEL_COLORS = {\n    'DEBUG': '',\n    'INFO': '',\n    'WARNING': color.YELLOW,\n    'ERROR': color.RED,\n}\n\n\nclass LoggingHandler(logging.Handler):\n    def __init__(self, use_color):\n        super(LoggingHandler, self).__init__()\n        self.use_color = use_color\n\n    def emit(self, record):\n        print(\n            u'{0}{1}'.format(\n                color.format_color(\n                    '[{0}]'.format(record.levelname),\n                    LOG_LEVEL_COLORS[record.levelname],\n                    self.use_color,\n                ) + ' ' if record.levelno >= logging.WARNING else '',\n                record.getMessage(),\n            )\n        )\n", "path": "pre_commit/logging_handler.py"}]}