@@ -30,7 +30,12 @@ def from_yaml(cls, yaml: Dict[str, str] | None) -> Optional[TitleInfo]:
3030 title_abbrev = yaml .get ("title_abbrev" )
3131 synopsis = yaml .get ("synopsis" )
3232
33- return cls (title = title , title_suffixes = title_suffixes , title_abbrev = title_abbrev , synopsis = synopsis )
33+ return cls (
34+ title = title ,
35+ title_suffixes = title_suffixes ,
36+ title_abbrev = title_abbrev ,
37+ synopsis = synopsis ,
38+ )
3439
3540
3641@dataclass
@@ -52,17 +57,30 @@ def validate(self, errors: MetadataErrors):
5257 errors .append (CategoryWithNoDisplayError (id = self .key ))
5358
5459 @classmethod
55- def from_yaml (cls , key : str , yaml : Dict [str , Any ]) -> tuple [Category , MetadataErrors ]:
60+ def from_yaml (
61+ cls , key : str , yaml : Dict [str , Any ]
62+ ) -> tuple [Category , MetadataErrors ]:
5663 errors = MetadataErrors ()
5764 display = str (yaml .get ("display" ))
5865 defaults = TitleInfo .from_yaml (yaml .get ("defaults" ))
5966 overrides = TitleInfo .from_yaml (yaml .get ("overrides" ))
6067 description = yaml .get ("description" )
6168
62- return cls (key = key , display = display , defaults = defaults , overrides = overrides , description = description ), errors
63-
64-
65- def parse (file : Path , yaml : Dict [str , Any ]) -> tuple [List [str ], Dict [str , Category ], MetadataErrors ]:
69+ return (
70+ cls (
71+ key = key ,
72+ display = display ,
73+ defaults = defaults ,
74+ overrides = overrides ,
75+ description = description ,
76+ ),
77+ errors ,
78+ )
79+
80+
81+ def parse (
82+ file : Path , yaml : Dict [str , Any ]
83+ ) -> tuple [List [str ], Dict [str , Category ], MetadataErrors ]:
6684 categories : Dict [str , Category ] = {}
6785 errors = MetadataErrors ()
6886
0 commit comments