We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
`any` converter should validate value to `url_for`
Expectation:
When using `url_for` for an endpoint with an `<any(foo, bar):arg>` argument in its route, it will raise an error for arguments that are not part of the any statement.

Actual result:
It returns an invalid URL


Example:
```
from flask import Flask, url_for, redirect

app = Flask(__name__)

@app.route("/any/<any(foo, bar):part>")
def url_with_any(part):
    return part

@app.route("/")
def index():
    return redirect(url_for("url_with_any", part="doesnotexist")) # this will 404

```

Environment:

- Python version: Python 3.10.4
- Flask version: Flask 2.1.1


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `src/werkzeug/routing/converters.py`
Content:
```
1 import re
2 import typing as t
3 import uuid
4 
5 from ..urls import _fast_url_quote
6 
7 if t.TYPE_CHECKING:
8     from .map import Map
9 
10 
11 class ValidationError(ValueError):
12     """Validation error.  If a rule converter raises this exception the rule
13     does not match the current URL and the next URL is tried.
14     """
15 
16 
17 class BaseConverter:
18     """Base class for all converters."""
19 
20     regex = "[^/]+"
21     weight = 100
22     part_isolating = True
23 
24     def __init__(self, map: "Map", *args: t.Any, **kwargs: t.Any) -> None:
25         self.map = map
26 
27     def to_python(self, value: str) -> t.Any:
28         return value
29 
30     def to_url(self, value: t.Any) -> str:
31         if isinstance(value, (bytes, bytearray)):
32             return _fast_url_quote(value)
33         return _fast_url_quote(str(value).encode(self.map.charset))
34 
35 
36 class UnicodeConverter(BaseConverter):
37     """This converter is the default converter and accepts any string but
38     only one path segment.  Thus the string can not include a slash.
39 
40     This is the default validator.
41 
42     Example::
43 
44         Rule('/pages/<page>'),
45         Rule('/<string(length=2):lang_code>')
46 
47     :param map: the :class:`Map`.
48     :param minlength: the minimum length of the string.  Must be greater
49                       or equal 1.
50     :param maxlength: the maximum length of the string.
51     :param length: the exact length of the string.
52     """
53 
54     part_isolating = True
55 
56     def __init__(
57         self,
58         map: "Map",
59         minlength: int = 1,
60         maxlength: t.Optional[int] = None,
61         length: t.Optional[int] = None,
62     ) -> None:
63         super().__init__(map)
64         if length is not None:
65             length_regex = f"{{{int(length)}}}"
66         else:
67             if maxlength is None:
68                 maxlength_value = ""
69             else:
70                 maxlength_value = str(int(maxlength))
71             length_regex = f"{{{int(minlength)},{maxlength_value}}}"
72         self.regex = f"[^/]{length_regex}"
73 
74 
75 class AnyConverter(BaseConverter):
76     """Matches one of the items provided.  Items can either be Python
77     identifiers or strings::
78 
79         Rule('/<any(about, help, imprint, class, "foo,bar"):page_name>')
80 
81     :param map: the :class:`Map`.
82     :param items: this function accepts the possible items as positional
83                   arguments.
84     """
85 
86     part_isolating = True
87 
88     def __init__(self, map: "Map", *items: str) -> None:
89         super().__init__(map)
90         self.regex = f"(?:{'|'.join([re.escape(x) for x in items])})"
91 
92 
93 class PathConverter(BaseConverter):
94     """Like the default :class:`UnicodeConverter`, but it also matches
95     slashes.  This is useful for wikis and similar applications::
96 
97         Rule('/<path:wikipage>')
98         Rule('/<path:wikipage>/edit')
99 
100     :param map: the :class:`Map`.
101     """
102 
103     regex = "[^/].*?"
104     weight = 200
105     part_isolating = False
106 
107 
108 class NumberConverter(BaseConverter):
109     """Baseclass for `IntegerConverter` and `FloatConverter`.
110 
111     :internal:
112     """
113 
114     weight = 50
115     num_convert: t.Callable = int
116     part_isolating = True
117 
118     def __init__(
119         self,
120         map: "Map",
121         fixed_digits: int = 0,
122         min: t.Optional[int] = None,
123         max: t.Optional[int] = None,
124         signed: bool = False,
125     ) -> None:
126         if signed:
127             self.regex = self.signed_regex
128         super().__init__(map)
129         self.fixed_digits = fixed_digits
130         self.min = min
131         self.max = max
132         self.signed = signed
133 
134     def to_python(self, value: str) -> t.Any:
135         if self.fixed_digits and len(value) != self.fixed_digits:
136             raise ValidationError()
137         value = self.num_convert(value)
138         if (self.min is not None and value < self.min) or (
139             self.max is not None and value > self.max
140         ):
141             raise ValidationError()
142         return value
143 
144     def to_url(self, value: t.Any) -> str:
145         value = str(self.num_convert(value))
146         if self.fixed_digits:
147             value = value.zfill(self.fixed_digits)
148         return value
149 
150     @property
151     def signed_regex(self) -> str:
152         return f"-?{self.regex}"
153 
154 
155 class IntegerConverter(NumberConverter):
156     """This converter only accepts integer values::
157 
158         Rule("/page/<int:page>")
159 
160     By default it only accepts unsigned, positive values. The ``signed``
161     parameter will enable signed, negative values. ::
162 
163         Rule("/page/<int(signed=True):page>")
164 
165     :param map: The :class:`Map`.
166     :param fixed_digits: The number of fixed digits in the URL. If you
167         set this to ``4`` for example, the rule will only match if the
168         URL looks like ``/0001/``. The default is variable length.
169     :param min: The minimal value.
170     :param max: The maximal value.
171     :param signed: Allow signed (negative) values.
172 
173     .. versionadded:: 0.15
174         The ``signed`` parameter.
175     """
176 
177     regex = r"\d+"
178     part_isolating = True
179 
180 
181 class FloatConverter(NumberConverter):
182     """This converter only accepts floating point values::
183 
184         Rule("/probability/<float:probability>")
185 
186     By default it only accepts unsigned, positive values. The ``signed``
187     parameter will enable signed, negative values. ::
188 
189         Rule("/offset/<float(signed=True):offset>")
190 
191     :param map: The :class:`Map`.
192     :param min: The minimal value.
193     :param max: The maximal value.
194     :param signed: Allow signed (negative) values.
195 
196     .. versionadded:: 0.15
197         The ``signed`` parameter.
198     """
199 
200     regex = r"\d+\.\d+"
201     num_convert = float
202     part_isolating = True
203 
204     def __init__(
205         self,
206         map: "Map",
207         min: t.Optional[float] = None,
208         max: t.Optional[float] = None,
209         signed: bool = False,
210     ) -> None:
211         super().__init__(map, min=min, max=max, signed=signed)  # type: ignore
212 
213 
214 class UUIDConverter(BaseConverter):
215     """This converter only accepts UUID strings::
216 
217         Rule('/object/<uuid:identifier>')
218 
219     .. versionadded:: 0.10
220 
221     :param map: the :class:`Map`.
222     """
223 
224     regex = (
225         r"[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-"
226         r"[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}"
227     )
228     part_isolating = True
229 
230     def to_python(self, value: str) -> uuid.UUID:
231         return uuid.UUID(value)
232 
233     def to_url(self, value: uuid.UUID) -> str:
234         return str(value)
235 
236 
237 #: the default converter mapping for the map.
238 DEFAULT_CONVERTERS: t.Mapping[str, t.Type[BaseConverter]] = {
239     "default": UnicodeConverter,
240     "string": UnicodeConverter,
241     "any": AnyConverter,
242     "path": PathConverter,
243     "int": IntegerConverter,
244     "float": FloatConverter,
245     "uuid": UUIDConverter,
246 }
247
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/src/werkzeug/routing/converters.py b/src/werkzeug/routing/converters.py
--- a/src/werkzeug/routing/converters.py
+++ b/src/werkzeug/routing/converters.py
@@ -81,14 +81,25 @@
     :param map: the :class:`Map`.
     :param items: this function accepts the possible items as positional
                   arguments.
+
+    .. versionchanged:: 2.2
+        Value is validated when building a URL.
     """
 
     part_isolating = True
 
     def __init__(self, map: "Map", *items: str) -> None:
         super().__init__(map)
+        self.items = set(items)
         self.regex = f"(?:{'|'.join([re.escape(x) for x in items])})"
 
+    def to_url(self, value: t.Any) -> str:
+        if value in self.items:
+            return str(value)
+
+        valid_values = ", ".join(f"'{item}'" for item in sorted(self.items))
+        raise ValueError(f"'{value}' is not one of {valid_values}")
+
 
 class PathConverter(BaseConverter):
     """Like the default :class:`UnicodeConverter`, but it also matches

{"golden_diff": "diff --git a/src/werkzeug/routing/converters.py b/src/werkzeug/routing/converters.py\n--- a/src/werkzeug/routing/converters.py\n+++ b/src/werkzeug/routing/converters.py\n@@ -81,14 +81,25 @@\n     :param map: the :class:`Map`.\n     :param items: this function accepts the possible items as positional\n                   arguments.\n+\n+    .. versionchanged:: 2.2\n+        Value is validated when building a URL.\n     \"\"\"\n \n     part_isolating = True\n \n     def __init__(self, map: \"Map\", *items: str) -> None:\n         super().__init__(map)\n+        self.items = set(items)\n         self.regex = f\"(?:{'|'.join([re.escape(x) for x in items])})\"\n \n+    def to_url(self, value: t.Any) -> str:\n+        if value in self.items:\n+            return str(value)\n+\n+        valid_values = \", \".join(f\"'{item}'\" for item in sorted(self.items))\n+        raise ValueError(f\"'{value}' is not one of {valid_values}\")\n+\n \n class PathConverter(BaseConverter):\n     \"\"\"Like the default :class:`UnicodeConverter`, but it also matches\n", "issue": "`any` converter should validate value to `url_for`\nExpectation:\r\nWhen using `url_for` for an endpoint with an `<any(foo, bar):arg>` argument in its route, it will raise an error for arguments that are not part of the any statement.\r\n\r\nActual result:\r\nIt returns an invalid URL\r\n\r\n\r\nExample:\r\n```\r\nfrom flask import Flask, url_for, redirect\r\n\r\napp = Flask(__name__)\r\n\r\n@app.route(\"/any/<any(foo, bar):part>\")\r\ndef url_with_any(part):\r\n    return part\r\n\r\n@app.route(\"/\")\r\ndef index():\r\n    return redirect(url_for(\"url_with_any\", part=\"doesnotexist\")) # this will 404\r\n\r\n```\r\n\r\nEnvironment:\r\n\r\n- Python version: Python 3.10.4\r\n- Flask version: Flask 2.1.1\r\n\n", "before_files": [{"content": "import re\nimport typing as t\nimport uuid\n\nfrom ..urls import _fast_url_quote\n\nif t.TYPE_CHECKING:\n    from .map import Map\n\n\nclass ValidationError(ValueError):\n    \"\"\"Validation error.  If a rule converter raises this exception the rule\n    does not match the current URL and the next URL is tried.\n    \"\"\"\n\n\nclass BaseConverter:\n    \"\"\"Base class for all converters.\"\"\"\n\n    regex = \"[^/]+\"\n    weight = 100\n    part_isolating = True\n\n    def __init__(self, map: \"Map\", *args: t.Any, **kwargs: t.Any) -> None:\n        self.map = map\n\n    def to_python(self, value: str) -> t.Any:\n        return value\n\n    def to_url(self, value: t.Any) -> str:\n        if isinstance(value, (bytes, bytearray)):\n            return _fast_url_quote(value)\n        return _fast_url_quote(str(value).encode(self.map.charset))\n\n\nclass UnicodeConverter(BaseConverter):\n    \"\"\"This converter is the default converter and accepts any string but\n    only one path segment.  Thus the string can not include a slash.\n\n    This is the default validator.\n\n    Example::\n\n        Rule('/pages/<page>'),\n        Rule('/<string(length=2):lang_code>')\n\n    :param map: the :class:`Map`.\n    :param minlength: the minimum length of the string.  Must be greater\n                      or equal 1.\n    :param maxlength: the maximum length of the string.\n    :param length: the exact length of the string.\n    \"\"\"\n\n    part_isolating = True\n\n    def __init__(\n        self,\n        map: \"Map\",\n        minlength: int = 1,\n        maxlength: t.Optional[int] = None,\n        length: t.Optional[int] = None,\n    ) -> None:\n        super().__init__(map)\n        if length is not None:\n            length_regex = f\"{{{int(length)}}}\"\n        else:\n            if maxlength is None:\n                maxlength_value = \"\"\n            else:\n                maxlength_value = str(int(maxlength))\n            length_regex = f\"{{{int(minlength)},{maxlength_value}}}\"\n        self.regex = f\"[^/]{length_regex}\"\n\n\nclass AnyConverter(BaseConverter):\n    \"\"\"Matches one of the items provided.  Items can either be Python\n    identifiers or strings::\n\n        Rule('/<any(about, help, imprint, class, \"foo,bar\"):page_name>')\n\n    :param map: the :class:`Map`.\n    :param items: this function accepts the possible items as positional\n                  arguments.\n    \"\"\"\n\n    part_isolating = True\n\n    def __init__(self, map: \"Map\", *items: str) -> None:\n        super().__init__(map)\n        self.regex = f\"(?:{'|'.join([re.escape(x) for x in items])})\"\n\n\nclass PathConverter(BaseConverter):\n    \"\"\"Like the default :class:`UnicodeConverter`, but it also matches\n    slashes.  This is useful for wikis and similar applications::\n\n        Rule('/<path:wikipage>')\n        Rule('/<path:wikipage>/edit')\n\n    :param map: the :class:`Map`.\n    \"\"\"\n\n    regex = \"[^/].*?\"\n    weight = 200\n    part_isolating = False\n\n\nclass NumberConverter(BaseConverter):\n    \"\"\"Baseclass for `IntegerConverter` and `FloatConverter`.\n\n    :internal:\n    \"\"\"\n\n    weight = 50\n    num_convert: t.Callable = int\n    part_isolating = True\n\n    def __init__(\n        self,\n        map: \"Map\",\n        fixed_digits: int = 0,\n        min: t.Optional[int] = None,\n        max: t.Optional[int] = None,\n        signed: bool = False,\n    ) -> None:\n        if signed:\n            self.regex = self.signed_regex\n        super().__init__(map)\n        self.fixed_digits = fixed_digits\n        self.min = min\n        self.max = max\n        self.signed = signed\n\n    def to_python(self, value: str) -> t.Any:\n        if self.fixed_digits and len(value) != self.fixed_digits:\n            raise ValidationError()\n        value = self.num_convert(value)\n        if (self.min is not None and value < self.min) or (\n            self.max is not None and value > self.max\n        ):\n            raise ValidationError()\n        return value\n\n    def to_url(self, value: t.Any) -> str:\n        value = str(self.num_convert(value))\n        if self.fixed_digits:\n            value = value.zfill(self.fixed_digits)\n        return value\n\n    @property\n    def signed_regex(self) -> str:\n        return f\"-?{self.regex}\"\n\n\nclass IntegerConverter(NumberConverter):\n    \"\"\"This converter only accepts integer values::\n\n        Rule(\"/page/<int:page>\")\n\n    By default it only accepts unsigned, positive values. The ``signed``\n    parameter will enable signed, negative values. ::\n\n        Rule(\"/page/<int(signed=True):page>\")\n\n    :param map: The :class:`Map`.\n    :param fixed_digits: The number of fixed digits in the URL. If you\n        set this to ``4`` for example, the rule will only match if the\n        URL looks like ``/0001/``. The default is variable length.\n    :param min: The minimal value.\n    :param max: The maximal value.\n    :param signed: Allow signed (negative) values.\n\n    .. versionadded:: 0.15\n        The ``signed`` parameter.\n    \"\"\"\n\n    regex = r\"\\d+\"\n    part_isolating = True\n\n\nclass FloatConverter(NumberConverter):\n    \"\"\"This converter only accepts floating point values::\n\n        Rule(\"/probability/<float:probability>\")\n\n    By default it only accepts unsigned, positive values. The ``signed``\n    parameter will enable signed, negative values. ::\n\n        Rule(\"/offset/<float(signed=True):offset>\")\n\n    :param map: The :class:`Map`.\n    :param min: The minimal value.\n    :param max: The maximal value.\n    :param signed: Allow signed (negative) values.\n\n    .. versionadded:: 0.15\n        The ``signed`` parameter.\n    \"\"\"\n\n    regex = r\"\\d+\\.\\d+\"\n    num_convert = float\n    part_isolating = True\n\n    def __init__(\n        self,\n        map: \"Map\",\n        min: t.Optional[float] = None,\n        max: t.Optional[float] = None,\n        signed: bool = False,\n    ) -> None:\n        super().__init__(map, min=min, max=max, signed=signed)  # type: ignore\n\n\nclass UUIDConverter(BaseConverter):\n    \"\"\"This converter only accepts UUID strings::\n\n        Rule('/object/<uuid:identifier>')\n\n    .. versionadded:: 0.10\n\n    :param map: the :class:`Map`.\n    \"\"\"\n\n    regex = (\n        r\"[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-\"\n        r\"[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}\"\n    )\n    part_isolating = True\n\n    def to_python(self, value: str) -> uuid.UUID:\n        return uuid.UUID(value)\n\n    def to_url(self, value: uuid.UUID) -> str:\n        return str(value)\n\n\n#: the default converter mapping for the map.\nDEFAULT_CONVERTERS: t.Mapping[str, t.Type[BaseConverter]] = {\n    \"default\": UnicodeConverter,\n    \"string\": UnicodeConverter,\n    \"any\": AnyConverter,\n    \"path\": PathConverter,\n    \"int\": IntegerConverter,\n    \"float\": FloatConverter,\n    \"uuid\": UUIDConverter,\n}\n", "path": "src/werkzeug/routing/converters.py"}], "after_files": [{"content": "import re\nimport typing as t\nimport uuid\n\nfrom ..urls import _fast_url_quote\n\nif t.TYPE_CHECKING:\n    from .map import Map\n\n\nclass ValidationError(ValueError):\n    \"\"\"Validation error.  If a rule converter raises this exception the rule\n    does not match the current URL and the next URL is tried.\n    \"\"\"\n\n\nclass BaseConverter:\n    \"\"\"Base class for all converters.\"\"\"\n\n    regex = \"[^/]+\"\n    weight = 100\n    part_isolating = True\n\n    def __init__(self, map: \"Map\", *args: t.Any, **kwargs: t.Any) -> None:\n        self.map = map\n\n    def to_python(self, value: str) -> t.Any:\n        return value\n\n    def to_url(self, value: t.Any) -> str:\n        if isinstance(value, (bytes, bytearray)):\n            return _fast_url_quote(value)\n        return _fast_url_quote(str(value).encode(self.map.charset))\n\n\nclass UnicodeConverter(BaseConverter):\n    \"\"\"This converter is the default converter and accepts any string but\n    only one path segment.  Thus the string can not include a slash.\n\n    This is the default validator.\n\n    Example::\n\n        Rule('/pages/<page>'),\n        Rule('/<string(length=2):lang_code>')\n\n    :param map: the :class:`Map`.\n    :param minlength: the minimum length of the string.  Must be greater\n                      or equal 1.\n    :param maxlength: the maximum length of the string.\n    :param length: the exact length of the string.\n    \"\"\"\n\n    part_isolating = True\n\n    def __init__(\n        self,\n        map: \"Map\",\n        minlength: int = 1,\n        maxlength: t.Optional[int] = None,\n        length: t.Optional[int] = None,\n    ) -> None:\n        super().__init__(map)\n        if length is not None:\n            length_regex = f\"{{{int(length)}}}\"\n        else:\n            if maxlength is None:\n                maxlength_value = \"\"\n            else:\n                maxlength_value = str(int(maxlength))\n            length_regex = f\"{{{int(minlength)},{maxlength_value}}}\"\n        self.regex = f\"[^/]{length_regex}\"\n\n\nclass AnyConverter(BaseConverter):\n    \"\"\"Matches one of the items provided.  Items can either be Python\n    identifiers or strings::\n\n        Rule('/<any(about, help, imprint, class, \"foo,bar\"):page_name>')\n\n    :param map: the :class:`Map`.\n    :param items: this function accepts the possible items as positional\n                  arguments.\n\n    .. versionchanged:: 2.2\n        Value is validated when building a URL.\n    \"\"\"\n\n    part_isolating = True\n\n    def __init__(self, map: \"Map\", *items: str) -> None:\n        super().__init__(map)\n        self.items = set(items)\n        self.regex = f\"(?:{'|'.join([re.escape(x) for x in items])})\"\n\n    def to_url(self, value: t.Any) -> str:\n        if value in self.items:\n            return str(value)\n\n        valid_values = \", \".join(f\"'{item}'\" for item in sorted(self.items))\n        raise ValueError(f\"'{value}' is not one of {valid_values}\")\n\n\nclass PathConverter(BaseConverter):\n    \"\"\"Like the default :class:`UnicodeConverter`, but it also matches\n    slashes.  This is useful for wikis and similar applications::\n\n        Rule('/<path:wikipage>')\n        Rule('/<path:wikipage>/edit')\n\n    :param map: the :class:`Map`.\n    \"\"\"\n\n    regex = \"[^/].*?\"\n    weight = 200\n    part_isolating = False\n\n\nclass NumberConverter(BaseConverter):\n    \"\"\"Baseclass for `IntegerConverter` and `FloatConverter`.\n\n    :internal:\n    \"\"\"\n\n    weight = 50\n    num_convert: t.Callable = int\n    part_isolating = True\n\n    def __init__(\n        self,\n        map: \"Map\",\n        fixed_digits: int = 0,\n        min: t.Optional[int] = None,\n        max: t.Optional[int] = None,\n        signed: bool = False,\n    ) -> None:\n        if signed:\n            self.regex = self.signed_regex\n        super().__init__(map)\n        self.fixed_digits = fixed_digits\n        self.min = min\n        self.max = max\n        self.signed = signed\n\n    def to_python(self, value: str) -> t.Any:\n        if self.fixed_digits and len(value) != self.fixed_digits:\n            raise ValidationError()\n        value = self.num_convert(value)\n        if (self.min is not None and value < self.min) or (\n            self.max is not None and value > self.max\n        ):\n            raise ValidationError()\n        return value\n\n    def to_url(self, value: t.Any) -> str:\n        value = str(self.num_convert(value))\n        if self.fixed_digits:\n            value = value.zfill(self.fixed_digits)\n        return value\n\n    @property\n    def signed_regex(self) -> str:\n        return f\"-?{self.regex}\"\n\n\nclass IntegerConverter(NumberConverter):\n    \"\"\"This converter only accepts integer values::\n\n        Rule(\"/page/<int:page>\")\n\n    By default it only accepts unsigned, positive values. The ``signed``\n    parameter will enable signed, negative values. ::\n\n        Rule(\"/page/<int(signed=True):page>\")\n\n    :param map: The :class:`Map`.\n    :param fixed_digits: The number of fixed digits in the URL. If you\n        set this to ``4`` for example, the rule will only match if the\n        URL looks like ``/0001/``. The default is variable length.\n    :param min: The minimal value.\n    :param max: The maximal value.\n    :param signed: Allow signed (negative) values.\n\n    .. versionadded:: 0.15\n        The ``signed`` parameter.\n    \"\"\"\n\n    regex = r\"\\d+\"\n    part_isolating = True\n\n\nclass FloatConverter(NumberConverter):\n    \"\"\"This converter only accepts floating point values::\n\n        Rule(\"/probability/<float:probability>\")\n\n    By default it only accepts unsigned, positive values. The ``signed``\n    parameter will enable signed, negative values. ::\n\n        Rule(\"/offset/<float(signed=True):offset>\")\n\n    :param map: The :class:`Map`.\n    :param min: The minimal value.\n    :param max: The maximal value.\n    :param signed: Allow signed (negative) values.\n\n    .. versionadded:: 0.15\n        The ``signed`` parameter.\n    \"\"\"\n\n    regex = r\"\\d+\\.\\d+\"\n    num_convert = float\n    part_isolating = True\n\n    def __init__(\n        self,\n        map: \"Map\",\n        min: t.Optional[float] = None,\n        max: t.Optional[float] = None,\n        signed: bool = False,\n    ) -> None:\n        super().__init__(map, min=min, max=max, signed=signed)  # type: ignore\n\n\nclass UUIDConverter(BaseConverter):\n    \"\"\"This converter only accepts UUID strings::\n\n        Rule('/object/<uuid:identifier>')\n\n    .. versionadded:: 0.10\n\n    :param map: the :class:`Map`.\n    \"\"\"\n\n    regex = (\n        r\"[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-\"\n        r\"[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}\"\n    )\n    part_isolating = True\n\n    def to_python(self, value: str) -> uuid.UUID:\n        return uuid.UUID(value)\n\n    def to_url(self, value: uuid.UUID) -> str:\n        return str(value)\n\n\n#: the default converter mapping for the map.\nDEFAULT_CONVERTERS: t.Mapping[str, t.Type[BaseConverter]] = {\n    \"default\": UnicodeConverter,\n    \"string\": UnicodeConverter,\n    \"any\": AnyConverter,\n    \"path\": PathConverter,\n    \"int\": IntegerConverter,\n    \"float\": FloatConverter,\n    \"uuid\": UUIDConverter,\n}\n", "path": "src/werkzeug/routing/converters.py"}]}