File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -458,13 +458,13 @@ def _extra_deps_varname() -> str:
458
458
return 'extra_deps'
459
459
460
460
461
+ @dataclasses .dataclass
461
462
class PackageState :
462
- def __init__ (self , manifest : Manifest , downloaded : bool ) -> None :
463
- self .manifest = manifest
464
- self .downloaded = downloaded
465
- self .features : T .Set [str ] = set ()
466
- self .required_deps : T .Set [str ] = set ()
467
- self .optional_deps_features : T .Dict [str , T .Set [str ]] = collections .defaultdict (set )
463
+ manifest : Manifest
464
+ downloaded : bool = False
465
+ features : T .Set [str ] = dataclasses .field (default_factory = set )
466
+ required_deps : T .Set [str ] = dataclasses .field (default_factory = set )
467
+ optional_deps_features : T .Dict [str , T .Set [str ]] = dataclasses .field (default_factory = lambda : collections .defaultdict (set ))
468
468
469
469
470
470
@dataclasses .dataclass (frozen = True )
You can’t perform that action at this time.
0 commit comments