failed WRONG_FIX wrong_fix · 33 tool calls · 137 s · Textualize/rich
Regex error Fixes an issue with the regex used to select the fast path for strings with single-width characters. This may have had a detrimental effect on performance for some operations.
| # | Tool | Arguments | Result |
|---|---|---|---|
| 1 | run_command | {
"command": "grep -rn \"single-width\" --include=*.py rich | head -20"
} | {"status": "ok", "stdout": "", "stderr": "", "exit_code": 0}full{"status": "ok", "stdout": "", "stderr": "", "exit_code": 0} |
| 2 | run_command | {
"command": "grep -rn \"fast path\" --include=*.py rich | head -20"
} | {"status": "ok", "stdout": "", "stderr": "", "exit_code": 0}full{"status": "ok", "stdout": "", "stderr": "", "exit_code": 0} |
| 3 | run_command | {
"command": "grep -rn \"regex\" --include=*.py rich | grep \"width\" | head -20"
} | {"status": "ok", "stdout": "", "stderr": "", "exit_code": 0}full{"status": "ok", "stdout": "", "stderr": "", "exit_code": 0} |
| 4 | run_command | {
"command": "grep -rn \"re.compile\" --include=*.py rich | head -20"
} | {"status": "ok", "stdout": "rich/markup.py:12:RE_TAGS = re.compile(\nrich/markup.py:17:RE_HANDLER = re.compile(r\"^([\\w.]*?)(\\(.*?\\))?$\")\nrich/markup.py:50full{"status": "ok", "stdout": "rich/markup.py:12:RE_TAGS = re.compile(\nrich/markup.py:17:RE_HANDLER = re.compile(r\"^([\\w.]*?)(\\(.*?\\))?$\")\nrich/markup.py:50: _escape: _EscapeSubMethod = re.compile(r\"(\\\\*)(\\[[a-z#/@][^[]*?])\").sub,\nrich/_emoji_replace.py:15: _emoji_sub: _EmojiSubMethod = re.compile(r\"(:(\\S*?)(?:(?:\\-)(emoji|text))?:)\").sub,\nrich/cells.py:10:_is_single_cell_widths = re.compile(\"^[\\u0020-\\u006f\\u00a0\\u02ff\\u0370-\\u0482]*$\").match\nrich/color.py:292:RE_COLOR = re.compile(\nrich/ansi.py:10:re_ansi = re.compile(\nrich/_wrap.py:9:re_word = re.compile(r\"\\s*\\S+\\s*\")\nrich/text.py:39:_re_whitespace = re.compile(r\"\\s+$\")\nrich/text.py:617: re_highlight = re.compile(re_highlight)\nrich/text.py:1311: re_indent = re.compile(r\"^( *)(.*)$\")\n", "stderr": "", "exit_code": 0} |
| 5 | run_command | {
"command": "grep -C 5 \"_is_single_cell_widths\" rich/cells.py"
} | {"status": "ok", "stdout": "from typing import Callable\n\nfrom ._cell_widths import CELL_WIDTHS\n\n# Regex to match sequence of the most common character rangefull{"status": "ok", "stdout": "from typing import Callable\n\nfrom ._cell_widths import CELL_WIDTHS\n\n# Regex to match sequence of the most common character ranges\n_is_single_cell_widths = re.compile(\"^[\\u0020-\\u006f\\u00a0\\u02ff\\u0370-\\u0482]*$\").match\n\n\n@lru_cache(4096)\ndef cached_cell_len(text: str) -> int:\n \"\"\"Get the number of cells required to display text.\n--\n\n\ndef set_cell_size(text: str, total: int) -> str:\n \"\"\"Set the length of a string to fit within given number of cells.\"\"\"\n\n if _is_single_cell_widths(text):\n size = len(text)\n if size < total:\n return text + \" \" * (total - size)\n return text[:total]\n\n", "stderr": "", "exit_code": 0} |
| 6 | run_command | {
"command": "cat rich/cells.py"
} | {"status": "ok", "stdout": "from __future__ import annotations\n\nimport re\nfrom functools import lru_cache\nfrom typing import Callable\n\nfrom ._cell_widths full{"status": "ok", "stdout": "from __future__ import annotations\n\nimport re\nfrom functools import lru_cache\nfrom typing import Callable\n\nfrom ._cell_widths import CELL_WIDTHS\n\n# Regex to match sequence of the most common character ranges\n_is_single_cell_widths = re.compile(\"^[\\u0020-\\u006f\\u00a0\\u02ff\\u0370-\\u0482]*$\").match\n\n\n@lru_cache(4096)\ndef cached_cell_len(text: str) -> int:\n \"\"\"Get the number of cells required to display text.\n\n This method always caches, which may use up a lot of memory. It is recommended to use\n `cell_len` over this method.\n\n Args:\n text (str): Text to display.\n\n Returns:\n int: Get the number of cells required to display text.\n \"\"\"\n _get_size = get_character_cell_size\n total_size = sum(_get_size(character) for character in text)\n return total_size\n\n\ndef cell_len(text: str, _cell_len: Callable[[str], int] = cached_cell_len) -> int:\n \"\"\"Get the number of cells required to display text.\n\n Args:\n text (str): Text to display.\n\n Returns:\n int: Get the number of cells required to display text.\n \"\"\"\n if len(text) < 512:\n return _cell_len(text)\n _get_size = get_character_cell_size\n total_size = sum(_get_size(character) for character in text)\n return total_size\n\n\n@lru_cache(maxsize=4096)\ndef get_character_cell_size(character: str) -> int:\n \"\"\"Get the cell size of a character.\n\n Args:\n character (str): A single character.\n\n Returns:\n int: Number of cells (0, 1 or 2) occupied by that character.\n \"\"\"\n return _get_codepoint_cell_size(ord(character))\n\n\n@lru_cache(maxsize=4096)\ndef _get_codepoint_cell_size(codepoint: int) -> int:\n \"\"\"Get the cell size of a character.\n\n Args:\n codepoint (int): Codepoint of a character.\n\n Returns:\n int: Number of cells (0, 1 or 2) occupied by that character.\n \"\"\"\n\n _table = CELL_WIDTH |
| 7 | run_command | {
"command": "cat rich/_cell_widths.py"
} | {"status": "ok", "stdout": "# Auto generated by make_terminal_widths.py\n\nCELL_WIDTHS = [\n (0, 0, 0),\n (1, 31, -1),\n (127, 159, -1),\n (173, 173, 0),\n (768full{"status": "ok", "stdout": "# Auto generated by make_terminal_widths.py\n\nCELL_WIDTHS = [\n (0, 0, 0),\n (1, 31, -1),\n (127, 159, -1),\n (173, 173, 0),\n (768, 879, 0),\n (1155, 1161, 0),\n (1425, 1469, 0),\n (1471, 1471, 0),\n (1473, 1474, 0),\n (1476, 1477, 0),\n (1479, 1479, 0),\n (1536, 1541, 0),\n (1552, 1562, 0),\n (1564, 1564, 0),\n (1611, 1631, 0),\n (1648, 1648, 0),\n (1750, 1757, 0),\n (1759, 1764, 0),\n (1767, 1768, 0),\n (1770, 1773, 0),\n (1807, 1807, 0),\n (1809, 1809, 0),\n (1840, 1866, 0),\n (1958, 1968, 0),\n (2027, 2035, 0),\n (2045, 2045, 0),\n (2070, 2073, 0),\n (2075, 2083, 0),\n (2085, 2087, 0),\n (2089, 2093, 0),\n (2137, 2139, 0),\n (2192, 2193, 0),\n (2200, 2207, 0),\n (2250, 2307, 0),\n (2362, 2364, 0),\n (2366, 2383, 0),\n (2385, 2391, 0),\n (2402, 2403, 0),\n (2433, 2435, 0),\n (2492, 2492, 0),\n (2494, 2500, 0),\n (2503, 2504, 0),\n (2507, 2509, 0),\n (2519, 2519, 0),\n (2530, 2531, 0),\n (2558, 2558, 0),\n (2561, 2563, 0),\n (2620, 2620, 0),\n (2622, 2626, 0),\n (2631, 2632, 0),\n (2635, 2637, 0),\n (2641, 2641, 0),\n (2672, 2673, 0),\n (2677, 2677, 0),\n (2689, 2691, 0),\n (2748, 2748, 0),\n (2750, 2757, 0),\n (2759, 2761, 0),\n (2763, 2765, 0),\n (2786, 2787, 0),\n (2810, 2815, 0),\n (2817, 2819, 0),\n (2876, 2876, 0),\n (2878, 2884, 0),\n (2887, 2888, 0),\n (2891, 2893, 0),\n (2901, 2903, 0),\n (2914, 2915, 0),\n (2946, 2946, 0),\n (3006, 3010, 0),\n (3014, 3016, 0),\n (3018, 3021, 0),\n (3031, 3031, 0),\n (3072, 3076, 0),\n (3132, 3132, 0),\n (3134, 3140, 0),\n (3142, 3144, 0),\n (3146, 3149, 0),\n (3157, 3158, 0),\n (3170, 3171, 0),\n (3201, 3203, 0),\n (3260, 3260, 0),\n (3262, 3268, 0),\n (3270, 3272, 0),\n (3274, 3277, 0),\n (3285, 3286, 0),\n (3298, 3299, 0),\n (3315 |
| 8 | run_command | {
"command": "python3 -c \"import re; print(re.compile(r'^[\\\\u0020-\\\\u006f\\\\u00a0\\\\u02ff\\\\u0370-\\\\u0482]*$').match('abc').group()\""
} | {"status": "error", "error_type": "CommandError", "error_message": " File \"<string>\", line 1\n import re; print(re.compile(r'^[\\u0020-\\u006f\\u00a0\\u02ff\\full{"status": "error", "error_type": "CommandError", "error_message": " File \"<string>\", line 1\n import re; print(re.compile(r'^[\\u0020-\\u006f\\u00a0\\u02ff\\u0370-\\u0482]*$').match('abc').group()\n ^\nSyntaxError: '(' was never closed\n", "details": {"stdout": "", "stderr": " File \"<string>\", line 1\n import re; print(re.compile(r'^[\\u0020-\\u006f\\u00a0\\u02ff\\u0370-\\u0482]*$').match('abc').group()\n ^\nSyntaxError: '(' was never closed\n", "exit_code": 1}} |
| 9 | run_command | {
"command": "python3 -c \"import re; print(re.compile(r'^[\\\\u0020-\\\\u006f\\\\u00a0\\\\u02ff\\\\u0370-\\\\u0482]*$').match('abc'))\""
} | {"status": "ok", "stdout": "<re.Match object; span=(0, 3), match='abc'>\n", "stderr": "", "exit_code": 0}full{"status": "ok", "stdout": "<re.Match object; span=(0, 3), match='abc'>\n", "stderr": "", "exit_code": 0} |
| 10 | run_command | {
"command": "python3 -c \"import re; print(re.compile(r'^[\\\\u0020-\\\\u006f\\\\u00a0\\\\u02ff\\\\u0370-\\\\u0482]*$').match('z'))\""
} | {"status": "ok", "stdout": "None\n", "stderr": "", "exit_code": 0}full{"status": "ok", "stdout": "None\n", "stderr": "", "exit_code": 0} |
| 11-12 ×2 | run_command | {
"command": "python3 -c \"import re; print(re.compile(r'^[\\\\u0020-\\\\u007f\\\\u00a0\\\\u02ff\\\\u0370-\\\\u0482]*$').match('z'))\""
} | {"status": "ok", "stdout": "<re.Match object; span=(0, 1), match='z'>\n", "stderr": "", "exit_code": 0}full{"status": "ok", "stdout": "<re.Match object; span=(0, 1), match='z'>\n", "stderr": "", "exit_code": 0} |
| 13 | edit_file | {
"filepath": "rich/cells.py",
"new_string": "# Regex to match sequence of the most common character ranges\n_is_single_cell_widths = re.compile(r\"^[\\u0020-\\u007f\\u00a0\\u02ff\\u0370-\\u0482]*$\").match",
"old_string": "# Regex to match sequence of the most common character ranges\n_is_single_cell_widths = re.compile(\\\"^[\\\\\\\\u0020-\\\\\\\\u006f\\\\\\\\u00a0\\\\\\\\u02ff\\\\\\\\u0370-\\\\\\\\u0482]*$\\\").match"
} | {"status": "error", "error_type": "FileEditError", "error_message": "Failed to replace: old_string not found. Ensure you're not escaping content incorrectly andfull{"status": "error", "error_type": "FileEditError", "error_message": "Failed to replace: old_string not found. Ensure you're not escaping content incorrectly and check whitespace, indentation, and context."} |
| 14 | run_command | {
"command": "grep -n \"_is_single_cell_widths\" rich/cells.py"
} | {"status": "ok", "stdout": "10:_is_single_cell_widths = re.compile(\"^[\\u0020-\\u006f\\u00a0\\u02ff\\u0370-\\u0482]*$\").match\n92: if _is_single_cell_widths(tfull{"status": "ok", "stdout": "10:_is_single_cell_widths = re.compile(\"^[\\u0020-\\u006f\\u00a0\\u02ff\\u0370-\\u0482]*$\").match\n92: if _is_single_cell_widths(text):\n", "stderr": "", "exit_code": 0} |
| 15 | edit_file | {
"filepath": "rich/cells.py",
"new_string": "_is_single_cell_widths = re.compile(r\"^[\\u0020-\\u007f\\u00a0\\u02ff\\u0370-\\u0482]*$\").match",
"old_string": "_is_single_cell_widths = re.compile(\\\"^[\\\\\\\\u0020-\\\\\\\\u006f\\\\\\\\u00a0\\\\\\\\u02ff\\\\\\\\u0370-\\\\\\\\u0482]*$\\\").match"
} | {"status": "error", "error_type": "FileEditError", "error_message": "Failed to replace: old_string not found. Ensure you're not escaping content incorrectly andfull{"status": "error", "error_type": "FileEditError", "error_message": "Failed to replace: old_string not found. Ensure you're not escaping content incorrectly and check whitespace, indentation, and context."} |
| 16 | run_command | {
"command": "cat -A rich/cells.py | head -n 15"
} | {"status": "ok", "stdout": "from __future__ import annotations$\n$\nimport re$\nfrom functools import lru_cache$\nfrom typing import Callable$\n$\nfrom ._cell_wfull{"status": "ok", "stdout": "from __future__ import annotations$\n$\nimport re$\nfrom functools import lru_cache$\nfrom typing import Callable$\n$\nfrom ._cell_widths import CELL_WIDTHS$\n$\n# Regex to match sequence of the most common character ranges$\n_is_single_cell_widths = re.compile(\"^[\\u0020-\\u006f\\u00a0\\u02ff\\u0370-\\u0482]*$\").match$\n$\n$\n@lru_cache(4096)$\ndef cached_cell_len(text: str) -> int:$\n \"\"\"Get the number of cells required to display text.$\n", "stderr": "", "exit_code": 0} |
| 17 | edit_file | {
"filepath": "rich/cells.py",
"new_string": "_is_single_cell_widths = re.compile(r\"^[\\u0020-\\u007f\\u00a0\\u02ff\\u0370-\\u0482]*$\").match",
"old_string": "_is_single_cell_widths = re.compile(\"^[\\\\u0020-\\\\u006f\\\\u00a0\\\\u02ff\\\\u0370-\\\\u0482]*$\").match"
} | {"status": "error", "error_type": "FileEditError", "error_message": "Failed to replace: old_string not found. Ensure you're not escaping content incorrectly andfull{"status": "error", "error_type": "FileEditError", "error_message": "Failed to replace: old_string not found. Ensure you're not escaping content incorrectly and check whitespace, indentation, and context."} |
| 18 | run_command | {
"command": "sed -n '10p' rich/cells.py"
} | {"status": "ok", "stdout": "_is_single_cell_widths = re.compile(\"^[\\u0020-\\u006f\\u00a0\\u02ff\\u0370-\\u0482]*$\").match\n", "stderr": "", "exit_code": 0}full{"status": "ok", "stdout": "_is_single_cell_widths = re.compile(\"^[\\u0020-\\u006f\\u00a0\\u02ff\\u0370-\\u0482]*$\").match\n", "stderr": "", "exit_code": 0} |
| 19 | edit_file | {
"filepath": "rich/cells.py",
"new_string": "_is_single_cell_widths = re.compile(r\"^[\\u0020-\\u007f\\u00a0\\u02ff\\u0370-\\u0482]*$\").match",
"old_string": "_is_single_cell_widths = re.compile(\"^[\\\\u0020-\\\\u006f\\\\u00a0\\\\u02ff\\\\u0370-\\\\u0482]*$\").match"
} | {"status": "error", "error_type": "FileEditError", "error_message": "Failed to replace: old_string not found. Ensure you're not escaping content incorrectly andfull{"status": "error", "error_type": "FileEditError", "error_message": "Failed to replace: old_string not found. Ensure you're not escaping content incorrectly and check whitespace, indentation, and context."} |
| 20 | run_command | {
"command": "python3 -c \"import rich.cells; print(rich.cells._is_single_cell_widths)\""
} | {"status": "ok", "stdout": "<built-in method match of re.Pattern object at 0xaaa6330>\n", "stderr": "", "exit_code": 0}full{"status": "ok", "stdout": "<built-in method match of re.Pattern object at 0xaaa6330>\n", "stderr": "", "exit_code": 0} |
| 21 | run_command | {
"command": "python3 -c \"import re; print(re.compile('^[\\\\u0020-\\\\u006f\\\\u00a0\\\\u02ff\\\\u0370-\\\\u0482]*$').pattern)\""
} | {"status": "ok", "stdout": "^[ -o\u00a0\u02ff\u0370-\u0482]*$\n", "stderr": "", "exit_code": 0}full{"status": "ok", "stdout": "^[ -o\u00a0\u02ff\u0370-\u0482]*$\n", "stderr": "", "exit_code": 0} |
| 22 | run_command | {
"command": "python3 -c \"import re; print(re.compile(r'^[\\\\u0020-\\\\u006f\\\\u00a0\\\\u02ff\\\\u0370-\\\\u0482]*$').pattern)\""
} | {"status": "ok", "stdout": "^[\\u0020-\\u006f\\u00a0\\u02ff\\u0370-\\u0482]*$\n", "stderr": "", "exit_code": 0}full{"status": "ok", "stdout": "^[\\u0020-\\u006f\\u00a0\\u02ff\\u0370-\\u0482]*$\n", "stderr": "", "exit_code": 0} |
| 23 | edit_file | {
"filepath": "rich/cells.py",
"new_string": "_is_single_cell_widths = re.compile(r\"^[\\u0020-\\u007f\\u00a0\\u02ff\\u0370-\\u0482]*$\").match",
"old_string": "_is_single_cell_widths = re.compile(r\"^[\\\\u0020-\\\\u006f\\\\u00a0\\\\u02ff\\\\u0370-\\\\u0482]*$\").match"
} | {"status": "error", "error_type": "FileEditError", "error_message": "Failed to replace: old_string not found. Ensure you're not escaping content incorrectly andfull{"status": "error", "error_type": "FileEditError", "error_message": "Failed to replace: old_string not found. Ensure you're not escaping content incorrectly and check whitespace, indentation, and context."} |
| 24 | run_command | {
"command": "cat rich/cells.py | head -n 15"
} | {"status": "ok", "stdout": "from __future__ import annotations\n\nimport re\nfrom functools import lru_cache\nfrom typing import Callable\n\nfrom ._cell_widths full{"status": "ok", "stdout": "from __future__ import annotations\n\nimport re\nfrom functools import lru_cache\nfrom typing import Callable\n\nfrom ._cell_widths import CELL_WIDTHS\n\n# Regex to match sequence of the most common character ranges\n_is_single_cell_widths = re.compile(\"^[\\u0020-\\u006f\\u00a0\\u02ff\\u0370-\\u0482]*$\").match\n\n\n@lru_cache(4096)\ndef cached_cell_len(text: str) -> int:\n \"\"\"Get the number of cells required to display text.\n", "stderr": "", "exit_code": 0} |
| 25 | edit_file | {
"filepath": "rich/cells.py",
"new_string": "_is_single_cell_widths = re.compile(r\"^[\\u0020-\\u007f\\u00a0\\u02ff\\u0370-\\u0482]*$\").match",
"old_string": "_is_single_cell_widths = re.compile(\"^[\\\\u0020-\\\\u006f\\\\u00a0\\\\u02ff\\\\u0370-\\\\u0482]*$\").match"
} | {"status": "error", "error_type": "FileEditError", "error_message": "Failed to replace: old_string not found. Ensure you're not escaping content incorrectly andfull{"status": "error", "error_type": "FileEditError", "error_message": "Failed to replace: old_string not found. Ensure you're not escaping content incorrectly and check whitespace, indentation, and context."} |
| 26 | run_command | {
"command": "python3 -c \"import rich.cells; print(rich.cells._is_single_cell_widths.__self__.pattern)\""
} | {"status": "ok", "stdout": "^[ -o\u00a0\u02ff\u0370-\u0482]*$\n", "stderr": "", "exit_code": 0}full{"status": "ok", "stdout": "^[ -o\u00a0\u02ff\u0370-\u0482]*$\n", "stderr": "", "exit_code": 0} |
| 27 | edit_file | {
"filepath": "rich/cells.py",
"new_string": "_is_single_cell_widths = re.compile(r\"^[\\u0020-\\u007f\\u00a0\\u02ff\\u0370-\\u0482]*$\").match",
"old_string": "_is_single_cell_widths = re.compile(\"^[\\\\u0020-\\\\u006f\\\\u00a0\\\\u02ff\\\\u0370-\\\\u0482]*$\").match"
} | {"status": "error", "error_type": "FileEditError", "error_message": "Failed to replace: old_string not found. Ensure you're not escaping content incorrectly andfull{"status": "error", "error_type": "FileEditError", "error_message": "Failed to replace: old_string not found. Ensure you're not escaping content incorrectly and check whitespace, indentation, and context."} |
| 28 | run_command | {
"command": "cat -A rich/cells.py | head -n 15"
} | {"status": "ok", "stdout": "from __future__ import annotations$\n$\nimport re$\nfrom functools import lru_cache$\nfrom typing import Callable$\n$\nfrom ._cell_wfull{"status": "ok", "stdout": "from __future__ import annotations$\n$\nimport re$\nfrom functools import lru_cache$\nfrom typing import Callable$\n$\nfrom ._cell_widths import CELL_WIDTHS$\n$\n# Regex to match sequence of the most common character ranges$\n_is_single_cell_widths = re.compile(\"^[\\u0020-\\u006f\\u00a0\\u02ff\\u0370-\\u0482]*$\").match$\n$\n$\n@lru_cache(4096)$\ndef cached_cell_len(text: str) -> int:$\n \"\"\"Get the number of cells required to display text.$\n", "stderr": "", "exit_code": 0} |
| 29 | edit_file | {
"filepath": "rich/cells.py",
"new_string": "_is_single_cell_widths = re.compile(r\"^[\\u0020-\\u007f\\u00a0\\u02ff\\u0370-\\u0482]*$\").match",
"old_string": "_is_single_cell_widths = re.compile(\"^[\\\\u0020-\\\\u006f\\\\u00a0\\\\u02ff\\\\u0370-\\\\u0482]*$\").match"
} | {"status": "error", "error_type": "FileEditError", "error_message": "Failed to replace: old_string not found. Ensure you're not escaping content incorrectly andfull{"status": "error", "error_type": "FileEditError", "error_message": "Failed to replace: old_string not found. Ensure you're not escaping content incorrectly and check whitespace, indentation, and context."} |
| 30 | run_command | {
"command": "sed -i '10s/\\\\u006f/\\\\u007f/' rich/cells.py"
} | {"status": "ok", "stdout": "", "stderr": "", "exit_code": 0}full{"status": "ok", "stdout": "", "stderr": "", "exit_code": 0} |
| 31 | run_command | {
"command": "sed -n '10p' rich/cells.py"
} | {"status": "ok", "stdout": "_is_single_cell_widths = re.compile(\"^[\\u0020-\\u007f\\u00a0\\u02ff\\u0370-\\u0482]*$\").match\n", "stderr": "", "exit_code": 0}full{"status": "ok", "stdout": "_is_single_cell_widths = re.compile(\"^[\\u0020-\\u007f\\u00a0\\u02ff\\u0370-\\u0482]*$\").match\n", "stderr": "", "exit_code": 0} |
| 32 | run_command | {
"command": "python3 -c \"import rich.cells; print(rich.cells._is_single_cell_widths.__self__.pattern)\""
} | {"status": "ok", "stdout": "^[ -\u007f\u00a0\u02ff\u0370-\u0482]*$\n", "stderr": "", "exit_code": 0}full{"status": "ok", "stdout": "^[ -\u007f\u00a0\u02ff\u0370-\u0482]*$\n", "stderr": "", "exit_code": 0} |
| 33 | run_command | {
"command": "python3 -c \"import rich.cells; print(rich.cells._is_single_cell_widths('z'))\""
} | {"status": "ok", "stdout": "<re.Match object; span=(0, 1), match='z'>\n", "stderr": "", "exit_code": 0}full{"status": "ok", "stdout": "<re.Match object; span=(0, 1), match='z'>\n", "stderr": "", "exit_code": 0} |
| 34 | submit_patch | {} | {"status": "ok", "patch_size": 465, "files_changed": 1}full{"status": "ok", "patch_size": 465, "files_changed": 1} |
diff --git a/rich/cells.py b/rich/cells.py
index f85f928f..93ecf6ab 100644
--- a/rich/cells.py
+++ b/rich/cells.py
@@ -7,7 +7,7 @@ from typing import Callable
from ._cell_widths import CELL_WIDTHS
# Regex to match sequence of the most common character ranges
-_is_single_cell_widths = re.compile("^[\u0020-\u006f\u00a0\u02ff\u0370-\u0482]*$").match
+_is_single_cell_widths = re.compile("^[\u0020-\u007f\u00a0\u02ff\u0370-\u0482]*$").match
@lru_cache(4096)
.......F
=================================== FAILURES ===================================
__________________________ test_is_single_cell_widths __________________________
def test_is_single_cell_widths() -> None:
# Check _is_single_cell_widths reports correctly
for character in string.printable:
if ord(character) >= 32:
assert _is_single_cell_widths(character)
BOX = "┌─┬┐│ ││├─┼┤│ ││├─┼┤├─┼┤│ ││└─┴┘"
for character in BOX:
> assert _is_single_cell_widths(character)
E AssertionError: assert None
E + where None = _is_single_cell_widths('┌')
tests/test_cells.py:75: AssertionError
!!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!
1 failed, 7 passed in 0.05s