prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  It should be :
  https://github.com/streamlit/streamlit/blob/535f11765817657892506d6904bbbe04908dbdf3/lib/streamlit/elements/alert.py#L145
  
  
  </issue>
  <code>
  [start of lib/streamlit/elements/alert.py]
  1 # Copyright 2018-2022 Streamlit Inc.
  2 #
  3 # Licensed under the Apache License, Version 2.0 (the "License");
  4 # you may not use this file except in compliance with the License.
  5 # You may obtain a copy of the License at
  6 #
  7 #    http://www.apache.org/licenses/LICENSE-2.0
  8 #
  9 # Unless required by applicable law or agreed to in writing, software
  10 # distributed under the License is distributed on an "AS IS" BASIS,
  11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12 # See the License for the specific language governing permissions and
  13 # limitations under the License.
  14 
  15 from typing import cast, Optional, TYPE_CHECKING
  16 
  17 from streamlit.errors import StreamlitAPIException
  18 from streamlit.proto.Alert_pb2 import Alert as AlertProto
  19 from streamlit.string_util import clean_text, is_emoji
  20 
  21 if TYPE_CHECKING:
  22     from streamlit.delta_generator import DeltaGenerator
  23     from streamlit.type_util import SupportsStr
  24 
  25 
  26 def validate_emoji(maybe_emoji: Optional[str]) -> str:
  27     if maybe_emoji is None:
  28         return ""
  29     elif is_emoji(maybe_emoji):
  30         return maybe_emoji
  31     else:
  32         raise StreamlitAPIException(
  33             f'The value "{maybe_emoji}" is not a valid emoji. Shortcodes are not allowed, please use a single character instead.'
  34         )
  35 
  36 
  37 class AlertMixin:
  38     def error(
  39         self,
  40         body: "SupportsStr",
  41         *,  # keyword-only args:
  42         icon: Optional[str] = None,
  43     ) -> "DeltaGenerator":
  44         """Display error message.
  45 
  46         Parameters
  47         ----------
  48         icon : None
  49             An optional parameter, that adds an emoji to the alert.
  50             The default is None.
  51             This argument can only be supplied by keyword.
  52         body : str
  53             The error text to display.
  54 
  55         Example
  56         -------
  57         >>> st.error('This is an error', icon="🚨")
  58 
  59         """
  60         alert_proto = AlertProto()
  61         alert_proto.icon = validate_emoji(icon)
  62         alert_proto.body = clean_text(body)
  63         alert_proto.format = AlertProto.ERROR
  64         return self.dg._enqueue("alert", alert_proto)
  65 
  66     def warning(
  67         self,
  68         body: "SupportsStr",
  69         *,  # keyword-only args:
  70         icon: Optional[str] = None,
  71     ) -> "DeltaGenerator":
  72         """Display warning message.
  73 
  74         Parameters
  75         ----------
  76         icon : None
  77             An optional parameter, that adds an emoji to the alert.
  78             The default is None.
  79             This argument can only be supplied by keyword.
  80 
  81         body : str
  82             The warning text to display.
  83 
  84         Example
  85         -------
  86         >>> st.warning('This is a warning', icon="⚠️")
  87 
  88         """
  89         alert_proto = AlertProto()
  90         alert_proto.body = clean_text(body)
  91         alert_proto.icon = validate_emoji(icon)
  92         alert_proto.format = AlertProto.WARNING
  93         return self.dg._enqueue("alert", alert_proto)
  94 
  95     def info(
  96         self,
  97         body: "SupportsStr",
  98         *,  # keyword-only args:
  99         icon: Optional[str] = None,
  100     ) -> "DeltaGenerator":
  101         """Display an informational message.
  102 
  103         Parameters
  104         ----------
  105         icon : None
  106             An optional parameter, that adds an emoji to the alert.
  107             The default is None.
  108             This argument can only be supplied by keyword.
  109 
  110         body : str
  111             The info text to display.
  112 
  113         Example
  114         -------
  115         >>> st.info('This is a purely informational message', icon="ℹ️")
  116 
  117         """
  118 
  119         alert_proto = AlertProto()
  120         alert_proto.body = clean_text(body)
  121         alert_proto.icon = validate_emoji(icon)
  122         alert_proto.format = AlertProto.INFO
  123         return self.dg._enqueue("alert", alert_proto)
  124 
  125     def success(
  126         self,
  127         body: "SupportsStr",
  128         *,  # keyword-only args:
  129         icon: Optional[str] = None,
  130     ) -> "DeltaGenerator":
  131         """Display a success message.
  132 
  133         Parameters
  134         ----------
  135         icon : None
  136             An optional parameter, that adds an emoji to the alert.
  137             The default is None.
  138             This argument can only be supplied by keyword.
  139 
  140         body : str
  141             The success text to display.
  142 
  143         Example
  144         -------
  145         >>> st.success('This is a success message!', icon:"✅")
  146 
  147         """
  148         alert_proto = AlertProto()
  149         alert_proto.body = clean_text(body)
  150         alert_proto.icon = validate_emoji(icon)
  151         alert_proto.format = AlertProto.SUCCESS
  152         return self.dg._enqueue("alert", alert_proto)
  153 
  154     @property
  155     def dg(self) -> "DeltaGenerator":
  156         """Get our DeltaGenerator."""
  157         return cast("DeltaGenerator", self)
  158
  [end of lib/streamlit/elements/alert.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/lib/streamlit/elements/alert.py b/lib/streamlit/elements/alert.py
  --- a/lib/streamlit/elements/alert.py
  +++ b/lib/streamlit/elements/alert.py
  @@ -142,7 +142,7 @@
   
           Example
           -------
  -        >>> st.success('This is a success message!', icon:"✅")
  +        >>> st.success('This is a success message!', icon="✅")
   
           """
           alert_proto = AlertProto()
  
verification_info: {"golden_diff": "diff --git a/lib/streamlit/elements/alert.py b/lib/streamlit/elements/alert.py\n--- a/lib/streamlit/elements/alert.py\n+++ b/lib/streamlit/elements/alert.py\n@@ -142,7 +142,7 @@\n \n         Example\n         -------\n-        >>> st.success('This is a success message!', icon:\"\u2705\")\n+        >>> st.success('This is a success message!', icon=\"\u2705\")\n \n         \"\"\"\n         alert_proto = AlertProto()\n", "issue": "It should be :\nhttps://github.com/streamlit/streamlit/blob/535f11765817657892506d6904bbbe04908dbdf3/lib/streamlit/elements/alert.py#L145\r\n\n", "before_files": [{"content": "# Copyright 2018-2022 Streamlit Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#    http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nfrom typing import cast, Optional, TYPE_CHECKING\n\nfrom streamlit.errors import StreamlitAPIException\nfrom streamlit.proto.Alert_pb2 import Alert as AlertProto\nfrom streamlit.string_util import clean_text, is_emoji\n\nif TYPE_CHECKING:\n    from streamlit.delta_generator import DeltaGenerator\n    from streamlit.type_util import SupportsStr\n\n\ndef validate_emoji(maybe_emoji: Optional[str]) -> str:\n    if maybe_emoji is None:\n        return \"\"\n    elif is_emoji(maybe_emoji):\n        return maybe_emoji\n    else:\n        raise StreamlitAPIException(\n            f'The value \"{maybe_emoji}\" is not a valid emoji. Shortcodes are not allowed, please use a single character instead.'\n        )\n\n\nclass AlertMixin:\n    def error(\n        self,\n        body: \"SupportsStr\",\n        *,  # keyword-only args:\n        icon: Optional[str] = None,\n    ) -> \"DeltaGenerator\":\n        \"\"\"Display error message.\n\n        Parameters\n        ----------\n        icon : None\n            An optional parameter, that adds an emoji to the alert.\n            The default is None.\n            This argument can only be supplied by keyword.\n        body : str\n            The error text to display.\n\n        Example\n        -------\n        >>> st.error('This is an error', icon=\"\ud83d\udea8\")\n\n        \"\"\"\n        alert_proto = AlertProto()\n        alert_proto.icon = validate_emoji(icon)\n        alert_proto.body = clean_text(body)\n        alert_proto.format = AlertProto.ERROR\n        return self.dg._enqueue(\"alert\", alert_proto)\n\n    def warning(\n        self,\n        body: \"SupportsStr\",\n        *,  # keyword-only args:\n        icon: Optional[str] = None,\n    ) -> \"DeltaGenerator\":\n        \"\"\"Display warning message.\n\n        Parameters\n        ----------\n        icon : None\n            An optional parameter, that adds an emoji to the alert.\n            The default is None.\n            This argument can only be supplied by keyword.\n\n        body : str\n            The warning text to display.\n\n        Example\n        -------\n        >>> st.warning('This is a warning', icon=\"\u26a0\ufe0f\")\n\n        \"\"\"\n        alert_proto = AlertProto()\n        alert_proto.body = clean_text(body)\n        alert_proto.icon = validate_emoji(icon)\n        alert_proto.format = AlertProto.WARNING\n        return self.dg._enqueue(\"alert\", alert_proto)\n\n    def info(\n        self,\n        body: \"SupportsStr\",\n        *,  # keyword-only args:\n        icon: Optional[str] = None,\n    ) -> \"DeltaGenerator\":\n        \"\"\"Display an informational message.\n\n        Parameters\n        ----------\n        icon : None\n            An optional parameter, that adds an emoji to the alert.\n            The default is None.\n            This argument can only be supplied by keyword.\n\n        body : str\n            The info text to display.\n\n        Example\n        -------\n        >>> st.info('This is a purely informational message', icon=\"\u2139\ufe0f\")\n\n        \"\"\"\n\n        alert_proto = AlertProto()\n        alert_proto.body = clean_text(body)\n        alert_proto.icon = validate_emoji(icon)\n        alert_proto.format = AlertProto.INFO\n        return self.dg._enqueue(\"alert\", alert_proto)\n\n    def success(\n        self,\n        body: \"SupportsStr\",\n        *,  # keyword-only args:\n        icon: Optional[str] = None,\n    ) -> \"DeltaGenerator\":\n        \"\"\"Display a success message.\n\n        Parameters\n        ----------\n        icon : None\n            An optional parameter, that adds an emoji to the alert.\n            The default is None.\n            This argument can only be supplied by keyword.\n\n        body : str\n            The success text to display.\n\n        Example\n        -------\n        >>> st.success('This is a success message!', icon:\"\u2705\")\n\n        \"\"\"\n        alert_proto = AlertProto()\n        alert_proto.body = clean_text(body)\n        alert_proto.icon = validate_emoji(icon)\n        alert_proto.format = AlertProto.SUCCESS\n        return self.dg._enqueue(\"alert\", alert_proto)\n\n    @property\n    def dg(self) -> \"DeltaGenerator\":\n        \"\"\"Get our DeltaGenerator.\"\"\"\n        return cast(\"DeltaGenerator\", self)\n", "path": "lib/streamlit/elements/alert.py"}]}