Skip to content

Commit 3874a9c

Browse files
committed
feat: python 3.13 support
1 parent aa50cc7 commit 3874a9c

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

.github/workflows/build-test-package-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
fail-fast: false
3232
matrix:
3333
os: [macos-latest, ubuntu-latest, windows-latest]
34-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
34+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
3535
robot-version: ["rf41", "rf50", "rf60", "rf61", "rf70", "rf71"]
3636
exclude:
3737
- os: macos-latest

hatch.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ post-install-commands = ["pip install -U -e {root:uri}/../robotframework"]
7575
python = "3.8"
7676

7777
[[envs.devel.matrix]]
78-
python = ["3.8", "3.9", "3.10", "3.11", "3.12"]
78+
python = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
7979
rf = ["rf41", "rf50", "rf60", "rf61", "rf70", "rf71"]
8080

8181
[envs.devel.overrides]

packages/core/src/robotcode/core/utils/dataclasses.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,8 @@ def add_type_signature_to_cache(t: Type[Any]) -> None:
242242
def _get_signature_cached(t: Type[Any]) -> inspect.Signature:
243243
r = __signature_cache.get(t, __NOT_SET)
244244
if r is __NOT_SET:
245+
if t is bool:
246+
raise ValueError
245247
r = __signature_cache[t] = inspect.signature(t)
246248
return cast(inspect.Signature, r)
247249

packages/robot/src/robotcode/robot/utils/markdownformatter.py

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from __future__ import annotations
22

3-
import functools
43
import itertools
54
import re
65
from abc import ABC, abstractmethod
@@ -224,7 +223,7 @@ def __init__(self) -> None:
224223
("*", self._format_bold),
225224
("_", self._format_italic),
226225
("``", self._format_code),
227-
("", functools.partial(LinkFormatter().format_link)),
226+
("", LinkFormatter().format_link),
228227
]
229228

230229
def format(self, line: str) -> str:
@@ -249,9 +248,10 @@ def _format_code(self, line: str) -> str:
249248
return self._code.sub("\\1`\\3`", line)
250249

251250

252-
class PreformattedFormatter(Formatter):
253-
_format_line = functools.partial(LineFormatter().format)
251+
_line_formatter = LineFormatter()
252+
254253

254+
class PreformattedFormatter(Formatter):
255255
def _handles(self, line: str) -> bool:
256256
return line.startswith("| ") or line == "|"
257257

@@ -261,8 +261,6 @@ def format(self, lines: List[str]) -> str:
261261

262262

263263
class ParagraphFormatter(Formatter):
264-
_format_line = functools.partial(LineFormatter().format)
265-
266264
def __init__(self, other_formatters: List[Formatter]) -> None:
267265
super().__init__()
268266
self._other_formatters = other_formatters
@@ -271,18 +269,17 @@ def _handles(self, line: str) -> bool:
271269
return not any(other.handles(line) for other in self._other_formatters)
272270

273271
def format(self, lines: List[str]) -> str:
274-
return self._format_line(" ".join(lines)) + "\n\n"
272+
return _line_formatter.format(" ".join(lines)) + "\n\n"
275273

276274

277275
class ListFormatter(Formatter):
278276
_strip_lines = False
279-
_format_item = functools.partial(LineFormatter().format)
280277

281278
def _handles(self, line: str) -> bool:
282279
return bool(line.strip().startswith("- ") or line.startswith(" ") and self._lines)
283280

284281
def format(self, lines: List[str]) -> str:
285-
items = ["- %s" % self._format_item(line) for line in self._combine_lines(lines)]
282+
items = ["- %s" % _line_formatter.format(line) for line in self._combine_lines(lines)]
286283
return "\n".join(items) + "\n\n"
287284

288285
def _combine_lines(self, lines: List[str]) -> Iterator[str]:
@@ -311,7 +308,7 @@ def format_line(self, line: str) -> str:
311308
class TableFormatter(Formatter):
312309
_table_line = re.compile(r"^\| (.* |)\|$")
313310
_line_splitter = re.compile(r" \|(?= )")
314-
_format_cell_content = functools.partial(LineFormatter().format)
311+
_format_cell_content = _line_formatter.format
315312

316313
def _handles(self, line: str) -> bool:
317314
return self._table_line.match(line) is not None
@@ -351,4 +348,4 @@ def _format_cell(self, content: str) -> str:
351348
if content.startswith("=") and content.endswith("="):
352349
content = content[1:-1]
353350

354-
return f" {self._format_cell_content(content).strip()} "
351+
return f" {_line_formatter.format(content).strip()} "

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ classifiers = [
3535
"Programming Language :: Python :: 3.10",
3636
"Programming Language :: Python :: 3.11",
3737
"Programming Language :: Python :: 3.12",
38+
"Programming Language :: Python :: 3.13",
3839
"Programming Language :: Python :: Implementation :: CPython",
3940
"Topic :: Software Development :: Testing",
4041
"Topic :: Software Development :: Testing :: Acceptance",

0 commit comments

Comments
 (0)