prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Enable `PT027`
  ### Summary
  
  - Enable [PT027](https://beta.ruff.rs/docs/rules/pytest-unittest-raises-assertion/).
  - Remove `unittest-assert-raises`.
  
  ```diff
  diff --git a/pylintrc b/pylintrc
  index 9148d110e..342dfc943 100644
  --- a/pylintrc
  +++ b/pylintrc
  @@ -79,7 +79,6 @@ enable=signature-differs,
          # Built-in rules
          # --------------
          # Custom rules
  -       unittest-assert-raises,
          lazy-builtin-import,
          useless-assignment,
   
  diff --git a/pyproject.toml b/pyproject.toml
  index 6c64df56e..120e8420c 100644
  --- a/pyproject.toml
  +++ b/pyproject.toml
  @@ -32,6 +32,7 @@ select = [
     "PT022",
     "PT023",
     "PT026",
  +  "PT027",
     "RUF010",
     "UP004",
     "UP008",
  ```
  
  ### Notes
  
  - Make sure to open a PR from a **non-master** branch.
  - Sign off the commit using the `-s` flag when making a commit:
  
    ```sh
    git commit -s -m "..."
             # ^^ make sure to use this
    ```
  
  - Include `#{issue_number}` (e.g. `#123`) in the PR description when opening a PR.
  
  
  </issue>
  <code>
  [start of pylint_plugins/__init__.py]
  1 from pylint_plugins.unittest_assert_raises import UnittestAssertRaises
  2 from pylint_plugins.import_checker import ImportChecker
  3 from pylint_plugins.assign_checker import AssignChecker
  4 
  5 
  6 def register(linter):
  7     linter.register_checker(UnittestAssertRaises(linter))
  8     linter.register_checker(ImportChecker(linter))
  9     linter.register_checker(AssignChecker(linter))
  10
  [end of pylint_plugins/__init__.py]
  [start of pylint_plugins/errors.py]
  1 from typing import NamedTuple, Dict, Tuple
  2 from functools import reduce
  3 
  4 
  5 class Message(NamedTuple):
  6     id: str
  7     name: str
  8     message: str
  9     reason: str
  10 
  11     def to_dict(self) -> Dict[str, Tuple[str, str, str]]:
  12         return {self.id: (self.message, self.name, self.reason)}
  13 
  14 
  15 def to_msgs(*messages: Message) -> Dict[str, Tuple[str, str, str]]:
  16     return reduce(lambda x, y: {**x, **y.to_dict()}, messages, {})
  17 
  18 
  19 UNITTEST_PYTEST_RAISES = Message(
  20     id="W0003",
  21     name="unittest-assert-raises",
  22     message="Use `pytest.raises` instead of `unittest.TestCase.assertRaises`.",
  23     reason="To enforce 'pytest-raises-multiple-statements' Message.",
  24 )
  25 
  26 
  27 LAZY_BUILTIN_IMPORT = Message(
  28     id="W0007",
  29     name="lazy-builtin-import",
  30     message="Import built-in module(s) (%s) at the top of the file.",
  31     reason="There is no reason they should be imported inside a function.",
  32 )
  33 
  34 USELESS_ASSIGNMENT = Message(
  35     id="W0008",
  36     name="useless-assignment",
  37     message="Useless assignment. Use immediate return instead.",
  38     reason="For simplicity and readability",
  39 )
  40
  [end of pylint_plugins/errors.py]
  [start of pylint_plugins/unittest_assert_raises.py]
  1 import astroid
  2 from pylint.interfaces import IAstroidChecker
  3 from pylint.checkers import BaseChecker
  4 
  5 from pylint_plugins.errors import UNITTEST_PYTEST_RAISES, to_msgs
  6 
  7 
  8 def _is_unittest_assert_raises(node: astroid.Call):
  9     return isinstance(node.func, astroid.Attribute) and (
  10         node.func.as_string() in ("self.assertRaises", "self.assertRaisesRegex")
  11     )
  12 
  13 
  14 class UnittestAssertRaises(BaseChecker):
  15     __implements__ = IAstroidChecker
  16 
  17     name = "unittest-assert-raises"
  18     msgs = to_msgs(UNITTEST_PYTEST_RAISES)
  19     priority = -1
  20 
  21     def visit_call(self, node: astroid.Call):
  22         if _is_unittest_assert_raises(node):
  23             self.add_message(UNITTEST_PYTEST_RAISES.name, node=node)
  24
  [end of pylint_plugins/unittest_assert_raises.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/pylint_plugins/__init__.py b/pylint_plugins/__init__.py
  --- a/pylint_plugins/__init__.py
  +++ b/pylint_plugins/__init__.py
  @@ -1,9 +1,7 @@
  -from pylint_plugins.unittest_assert_raises import UnittestAssertRaises
   from pylint_plugins.import_checker import ImportChecker
   from pylint_plugins.assign_checker import AssignChecker
   
   
   def register(linter):
  -    linter.register_checker(UnittestAssertRaises(linter))
       linter.register_checker(ImportChecker(linter))
       linter.register_checker(AssignChecker(linter))
  diff --git a/pylint_plugins/errors.py b/pylint_plugins/errors.py
  --- a/pylint_plugins/errors.py
  +++ b/pylint_plugins/errors.py
  @@ -16,14 +16,6 @@
       return reduce(lambda x, y: {**x, **y.to_dict()}, messages, {})
   
   
  -UNITTEST_PYTEST_RAISES = Message(
  -    id="W0003",
  -    name="unittest-assert-raises",
  -    message="Use `pytest.raises` instead of `unittest.TestCase.assertRaises`.",
  -    reason="To enforce 'pytest-raises-multiple-statements' Message.",
  -)
  -
  -
   LAZY_BUILTIN_IMPORT = Message(
       id="W0007",
       name="lazy-builtin-import",
  diff --git a/pylint_plugins/unittest_assert_raises.py b/pylint_plugins/unittest_assert_raises.py
  deleted file mode 100644
  --- a/pylint_plugins/unittest_assert_raises.py
  +++ /dev/null
  @@ -1,23 +0,0 @@
  -import astroid
  -from pylint.interfaces import IAstroidChecker
  -from pylint.checkers import BaseChecker
  -
  -from pylint_plugins.errors import UNITTEST_PYTEST_RAISES, to_msgs
  -
  -
  -def _is_unittest_assert_raises(node: astroid.Call):
  -    return isinstance(node.func, astroid.Attribute) and (
  -        node.func.as_string() in ("self.assertRaises", "self.assertRaisesRegex")
  -    )
  -
  -
  -class UnittestAssertRaises(BaseChecker):
  -    __implements__ = IAstroidChecker
  -
  -    name = "unittest-assert-raises"
  -    msgs = to_msgs(UNITTEST_PYTEST_RAISES)
  -    priority = -1
  -
  -    def visit_call(self, node: astroid.Call):
  -        if _is_unittest_assert_raises(node):
  -            self.add_message(UNITTEST_PYTEST_RAISES.name, node=node)
  
verification_info: {"golden_diff": "diff --git a/pylint_plugins/__init__.py b/pylint_plugins/__init__.py\n--- a/pylint_plugins/__init__.py\n+++ b/pylint_plugins/__init__.py\n@@ -1,9 +1,7 @@\n-from pylint_plugins.unittest_assert_raises import UnittestAssertRaises\n from pylint_plugins.import_checker import ImportChecker\n from pylint_plugins.assign_checker import AssignChecker\n \n \n def register(linter):\n-    linter.register_checker(UnittestAssertRaises(linter))\n     linter.register_checker(ImportChecker(linter))\n     linter.register_checker(AssignChecker(linter))\ndiff --git a/pylint_plugins/errors.py b/pylint_plugins/errors.py\n--- a/pylint_plugins/errors.py\n+++ b/pylint_plugins/errors.py\n@@ -16,14 +16,6 @@\n     return reduce(lambda x, y: {**x, **y.to_dict()}, messages, {})\n \n \n-UNITTEST_PYTEST_RAISES = Message(\n-    id=\"W0003\",\n-    name=\"unittest-assert-raises\",\n-    message=\"Use `pytest.raises` instead of `unittest.TestCase.assertRaises`.\",\n-    reason=\"To enforce 'pytest-raises-multiple-statements' Message.\",\n-)\n-\n-\n LAZY_BUILTIN_IMPORT = Message(\n     id=\"W0007\",\n     name=\"lazy-builtin-import\",\ndiff --git a/pylint_plugins/unittest_assert_raises.py b/pylint_plugins/unittest_assert_raises.py\ndeleted file mode 100644\n--- a/pylint_plugins/unittest_assert_raises.py\n+++ /dev/null\n@@ -1,23 +0,0 @@\n-import astroid\n-from pylint.interfaces import IAstroidChecker\n-from pylint.checkers import BaseChecker\n-\n-from pylint_plugins.errors import UNITTEST_PYTEST_RAISES, to_msgs\n-\n-\n-def _is_unittest_assert_raises(node: astroid.Call):\n-    return isinstance(node.func, astroid.Attribute) and (\n-        node.func.as_string() in (\"self.assertRaises\", \"self.assertRaisesRegex\")\n-    )\n-\n-\n-class UnittestAssertRaises(BaseChecker):\n-    __implements__ = IAstroidChecker\n-\n-    name = \"unittest-assert-raises\"\n-    msgs = to_msgs(UNITTEST_PYTEST_RAISES)\n-    priority = -1\n-\n-    def visit_call(self, node: astroid.Call):\n-        if _is_unittest_assert_raises(node):\n-            self.add_message(UNITTEST_PYTEST_RAISES.name, node=node)\n", "issue": "Enable `PT027`\n### Summary\n\n- Enable [PT027](https://beta.ruff.rs/docs/rules/pytest-unittest-raises-assertion/).\r\n- Remove `unittest-assert-raises`.\r\n\r\n```diff\r\ndiff --git a/pylintrc b/pylintrc\r\nindex 9148d110e..342dfc943 100644\r\n--- a/pylintrc\r\n+++ b/pylintrc\r\n@@ -79,7 +79,6 @@ enable=signature-differs,\r\n        # Built-in rules\r\n        # --------------\r\n        # Custom rules\r\n-       unittest-assert-raises,\r\n        lazy-builtin-import,\r\n        useless-assignment,\r\n \r\ndiff --git a/pyproject.toml b/pyproject.toml\r\nindex 6c64df56e..120e8420c 100644\r\n--- a/pyproject.toml\r\n+++ b/pyproject.toml\r\n@@ -32,6 +32,7 @@ select = [\r\n   \"PT022\",\r\n   \"PT023\",\r\n   \"PT026\",\r\n+  \"PT027\",\r\n   \"RUF010\",\r\n   \"UP004\",\r\n   \"UP008\",\r\n```\n\n### Notes\n\n- Make sure to open a PR from a **non-master** branch.\r\n- Sign off the commit using the `-s` flag when making a commit:\r\n\r\n  ```sh\r\n  git commit -s -m \"...\"\r\n           # ^^ make sure to use this\r\n  ```\r\n\r\n- Include `#{issue_number}` (e.g. `#123`) in the PR description when opening a PR.\r\n\n", "before_files": [{"content": "from pylint_plugins.unittest_assert_raises import UnittestAssertRaises\nfrom pylint_plugins.import_checker import ImportChecker\nfrom pylint_plugins.assign_checker import AssignChecker\n\n\ndef register(linter):\n    linter.register_checker(UnittestAssertRaises(linter))\n    linter.register_checker(ImportChecker(linter))\n    linter.register_checker(AssignChecker(linter))\n", "path": "pylint_plugins/__init__.py"}, {"content": "from typing import NamedTuple, Dict, Tuple\nfrom functools import reduce\n\n\nclass Message(NamedTuple):\n    id: str\n    name: str\n    message: str\n    reason: str\n\n    def to_dict(self) -> Dict[str, Tuple[str, str, str]]:\n        return {self.id: (self.message, self.name, self.reason)}\n\n\ndef to_msgs(*messages: Message) -> Dict[str, Tuple[str, str, str]]:\n    return reduce(lambda x, y: {**x, **y.to_dict()}, messages, {})\n\n\nUNITTEST_PYTEST_RAISES = Message(\n    id=\"W0003\",\n    name=\"unittest-assert-raises\",\n    message=\"Use `pytest.raises` instead of `unittest.TestCase.assertRaises`.\",\n    reason=\"To enforce 'pytest-raises-multiple-statements' Message.\",\n)\n\n\nLAZY_BUILTIN_IMPORT = Message(\n    id=\"W0007\",\n    name=\"lazy-builtin-import\",\n    message=\"Import built-in module(s) (%s) at the top of the file.\",\n    reason=\"There is no reason they should be imported inside a function.\",\n)\n\nUSELESS_ASSIGNMENT = Message(\n    id=\"W0008\",\n    name=\"useless-assignment\",\n    message=\"Useless assignment. Use immediate return instead.\",\n    reason=\"For simplicity and readability\",\n)\n", "path": "pylint_plugins/errors.py"}, {"content": "import astroid\nfrom pylint.interfaces import IAstroidChecker\nfrom pylint.checkers import BaseChecker\n\nfrom pylint_plugins.errors import UNITTEST_PYTEST_RAISES, to_msgs\n\n\ndef _is_unittest_assert_raises(node: astroid.Call):\n    return isinstance(node.func, astroid.Attribute) and (\n        node.func.as_string() in (\"self.assertRaises\", \"self.assertRaisesRegex\")\n    )\n\n\nclass UnittestAssertRaises(BaseChecker):\n    __implements__ = IAstroidChecker\n\n    name = \"unittest-assert-raises\"\n    msgs = to_msgs(UNITTEST_PYTEST_RAISES)\n    priority = -1\n\n    def visit_call(self, node: astroid.Call):\n        if _is_unittest_assert_raises(node):\n            self.add_message(UNITTEST_PYTEST_RAISES.name, node=node)\n", "path": "pylint_plugins/unittest_assert_raises.py"}]}