From ca4609bc3073b33a912e89cfc0315d3d4bc3698d Mon Sep 17 00:00:00 2001 From: Théo de la Hogue Date: Mon, 18 Sep 2023 10:16:29 +0200 Subject: Adding default value to dataclass field. --- src/argaze/GazeAnalysis/DeviationCircleCoverage.py | 2 +- src/argaze/GazeFeatures.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/argaze/GazeAnalysis/DeviationCircleCoverage.py b/src/argaze/GazeAnalysis/DeviationCircleCoverage.py index db707c0..4cfab72 100644 --- a/src/argaze/GazeAnalysis/DeviationCircleCoverage.py +++ b/src/argaze/GazeAnalysis/DeviationCircleCoverage.py @@ -25,7 +25,7 @@ GazeMovementType = TypeVar('GazeMovement', bound="GazeMovement") class AOIMatcher(GazeFeatures.AOIMatcher): """Matching algorithm based on fixation's deviation circle coverage over AOI.""" - coverage_threshold: float + coverage_threshold: float = field(default = 0.) """Minimal coverage ratio to consider a fixation over an AOI (1 means that whole fixation's deviation circle have to be over the AOI).""" def __post_init__(self): diff --git a/src/argaze/GazeFeatures.py b/src/argaze/GazeFeatures.py index d28986c..5b89558 100644 --- a/src/argaze/GazeFeatures.py +++ b/src/argaze/GazeFeatures.py @@ -722,7 +722,7 @@ class ScanPathAnalyzer(): class AOIMatcher(): """Abstract class to define what should provide an AOI matcher algorithm.""" - exclude: list[str] = field() + exclude: list[str] = field(default_factory = list) def match(self, aoi_scene: AOIFeatures.AOIScene, gaze_movement: GazeMovement) -> Tuple[str, AOIFeatures.AreaOfInterest]: """Which AOI is looked in the scene?""" -- cgit v1.1