Skip to content

Commit 4ae7e94

Browse files
More lint fixes
1 parent fb6ef77 commit 4ae7e94

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

python/pycrdt/_text.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from __future__ import annotations
22

3-
from typing import TYPE_CHECKING, Callable, cast, Any
3+
from typing import TYPE_CHECKING, Any, Callable, cast
44

55
from ._base import BaseEvent, BaseType, base_types, event_types
66
from ._pycrdt import Subscription
@@ -278,8 +278,8 @@ def diff(self) -> list[tuple[Any, dict[str, Any] | None]]:
278278
"""
279279
Returns list of formatted chunks that the current text corresponds to.
280280
281-
Each list item is a tuple containing the chunk's contents and formatting attributes. The contents is usually
282-
the text as a string, but may be other data for embedded objects.
281+
Each list item is a tuple containing the chunk's contents and formatting attributes. The
282+
contents is usually the text as a string, but may be other data for embedded objects.
283283
"""
284284
with self.doc.transaction() as txn:
285285
return self.integrated.diff(txn._txn)

python/pycrdt/_xml.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,8 @@ class XmlText(_XmlTraitMixin):
186186
"""
187187
A piece of text in an XML tree.
188188
189-
This is similar to the `Text` object, but instead of existing in a doc on its own, it is a child of
190-
an `XmlElement` or `XmlFragment`.
189+
This is similar to the `Text` object, but instead of existing in a doc on its own, it is a child
190+
of an `XmlElement` or `XmlFragment`.
191191
"""
192192

193193
_prelim: str | None
@@ -266,8 +266,8 @@ def diff(self) -> list[tuple[Any, dict[str, Any] | None]]:
266266
"""
267267
Returns list of formatted chunks that the current text corresponds to.
268268
269-
Each list item is a tuple containing the chunk's contents and formatting attributes. The contents is usually
270-
the text as a string, but may be other data for embedded objects.
269+
Each list item is a tuple containing the chunk's contents and formatting attributes. The
270+
contents is usually the text as a string, but may be other data for embedded objects.
271271
"""
272272
with self.doc.transaction() as txn:
273273
return self.integrated.diff(txn._txn)

tests/test_xml.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def callback(event):
8383
fragment.children.append(XmlElement("em", None, ["This is a test"]))
8484
assert len(events) == 1
8585
assert len(events[0]) == 1
86-
assert events[0][0].children_changed == True
86+
assert events[0][0].children_changed is True
8787
assert str(events[0][0].target) == "Hello world!<em>This is a test</em>"
8888
assert events[0][0].path == []
8989
assert len(events[0][0].delta) == 2

0 commit comments

Comments
 (0)