Skip to content

Commit

Permalink
Fix matter_yamltests with Python 11 again. (#26464)
Browse files Browse the repository at this point in the history
Due to https://docs.python.org/3.11/whatsnew/3.11.html#dataclasses, the previous
code fails: it's using a mutable class instance as a default values of a
dataclass field.
  • Loading branch information
bzbarsky-apple authored May 10, 2023
1 parent faaa2b6 commit 9425d4c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/py_matter_yamltests/matter_yamltests/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import asyncio
import time
from abc import ABC, abstractmethod
from dataclasses import dataclass
from dataclasses import dataclass, field

from .adapter import TestAdapter
from .hooks import TestRunnerHooks
Expand Down Expand Up @@ -72,7 +72,7 @@ class TestRunnerConfig:
"""
adapter: TestAdapter = None
pseudo_clusters: PseudoClusters = PseudoClusters([])
options: TestRunnerOptions = TestRunnerOptions()
options: TestRunnerOptions = field(default_factory=TestRunnerOptions)
hooks: TestRunnerHooks = TestRunnerHooks()


Expand Down

0 comments on commit 9425d4c

Please sign in to comment.