Skip to content

Commit 113b510

Browse files
maksververlemon24
authored andcommitted
Fix FutureWarning about _indent defined with functools.partial().
FutureWarning: functools.partial will be a method descriptor in future Python versions; wrap it in staticmethod() if you want to preserve the old behavior
1 parent 118a7af commit 113b510

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/reader/_storage/_sql_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ def _lines_keyword(self, keyword: str, things: list[_Thing]) -> Iterable[str]:
196196

197197
yield '\n'
198198

199-
_indent = functools.partial(textwrap.indent, prefix=' ')
199+
_indent = staticmethod(functools.partial(textwrap.indent, prefix=' '))
200200

201201

202202
if TYPE_CHECKING: # pragma: no cover

0 commit comments

Comments
 (0)