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

@ -1270,7 +1270,7 @@ def test_to_json(hass: HomeAssistant) -> None:
# Test special case where substring class cannot be rendered
# See: https://github.com/ijl/orjson/issues/445
class MyStr(str):
pass
__slots__ = ()
expected_result = '{"mykey1":11.0,"mykey2":"myvalue2","mykey3":["opt3b","opt3a"]}'
test_dict = {