Skip to content

Commit f32d0b1

Browse files
committed
ruff: Increase line length to 120
Far more sensible
1 parent a4670d1 commit f32d0b1

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,5 @@ profile = "black"
5252
# This file is explicitly ignored by version control.
5353
write_to = "src/techcable/orderedset/_version.py"
5454

55+
[tool.ruff]
56+
line-length = 120

src/techcable/orderedset/_orderedset.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,7 @@ def __gt__(self, other: object) -> bool:
206206
def __ge__(self, other: object) -> bool:
207207
return self._impl_cmp_op(other, operator.ge)
208208

209-
def sort(
210-
self, key: Optional[Callable[[T], U]] = None, reverse: bool = False
211-
) -> None:
209+
def sort(self, key: Optional[Callable[[T], U]] = None, reverse: bool = False) -> None:
212210
"""Sort the elements in the set, as if calling list.sort"""
213211
self._elements.sort(key=key, reverse=reverse)
214212

@@ -230,9 +228,7 @@ def __str__(self) -> str:
230228
return f"{{{', '.join(map(repr, self))}}}"
231229

232230
@classmethod
233-
def __get_pydantic_core_schema__(
234-
cls, source_type: Any, handler: GetCoreSchemaHandler
235-
) -> core_schema.CoreSchema:
231+
def __get_pydantic_core_schema__(cls, source_type: Any, handler: GetCoreSchemaHandler) -> core_schema.CoreSchema:
236232
# See here: https://docs.pydantic.dev/latest/concepts/types/#generic-containers
237233
instance_schema = core_schema.is_instance_schema(cls)
238234

@@ -244,9 +240,7 @@ def __get_pydantic_core_schema__(
244240
else:
245241
sequence_t_schema = handler.generate_schema(Sequence)
246242

247-
non_instance_schema = core_schema.no_info_after_validator_function(
248-
OrderedSet, sequence_t_schema
249-
)
243+
non_instance_schema = core_schema.no_info_after_validator_function(OrderedSet, sequence_t_schema)
250244
return core_schema.union_schema(
251245
[
252246
instance_schema,

0 commit comments

Comments
 (0)