Enable Ruff SLOT rules (#115043)

This commit is contained in:
Sid 2024-04-10 06:57:27 +02:00 committed by GitHub
parent 0636ba340c
commit d61db732da
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 9 additions and 4 deletions

View file

@ -305,6 +305,8 @@ def gen_result_wrapper(kls: type[dict | list | set]) -> type:
class TupleWrapper(tuple, ResultWrapper):
"""Wrap a tuple."""
__slots__ = ()
# This is all magic to be allowed to subclass a tuple.
def __new__(cls, value: tuple, *, render_result: str | None = None) -> Self: