11from pydantic import BaseModel , Field
2- from typing import Dict , Optional , Sequence , Union , Collection
2+ from typing import Sequence , Collection
33
44
55class PkgExtraEntry (BaseModel ):
66 """Extra metadata for a PKGBUILD"""
77
8- internal : bool = Field (default = False )
9- """If the package is MSYS2 internal or just a meta package"""
10-
11- references : Dict [str , list [Optional [str ]]] = Field (default_factory = dict )
8+ references : dict [str , list [str | None ]] = Field (default_factory = dict )
129 """References to third party repositories"""
1310
14- changelog_url : Optional [ str ] = Field (default = None )
11+ changelog_url : str | None = Field (default = None )
1512 """A NEWS file in git or the github releases page.
1613 In case there are multiple, the one that is more useful for packagers
1714 """
1815
19- documentation_url : Optional [ str ] = Field (default = None )
16+ documentation_url : str | None = Field (default = None )
2017 """Documentation for the API, tools, etc provided, in case it's a different
2118 website"""
2219
23- repository_url : Optional [ str ] = Field (default = None )
20+ repository_url : str | None = Field (default = None )
2421 """Web view of the repository, e.g. on github or gitlab"""
2522
26- issue_tracker_url : Optional [ str ] = Field (default = None )
23+ issue_tracker_url : str | None = Field (default = None )
2724 """The bug tracker, mailing list, etc"""
2825
29- pgp_keys_url : Optional [ str ] = Field (default = None )
26+ pgp_keys_url : str | None = Field (default = None )
3027 """A website containing which keys are used to sign releases"""
3128
29+ ignore_vulnerabilities : list [str ] = Field (default_factory = list )
30+ """List of CVEs or GHSAs that are either not relevant or not fixable"""
31+
3232
3333def convert_mapping (array : Sequence [str ]) -> dict [str , list [str | None ]]:
3434 converted : dict [str , list [str | None ]] = {}
@@ -43,7 +43,7 @@ def convert_mapping(array: Sequence[str]) -> dict[str, list[str | None]]:
4343 return converted
4444
4545
46- def extra_to_pkgextra_entry (data : Dict [str , Union [ str , Collection [str ] ]]) -> PkgExtraEntry :
46+ def extra_to_pkgextra_entry (data : dict [str , str | Collection [str ]]) -> PkgExtraEntry :
4747 mappings = ["references" ]
4848
4949 data = dict (data )
0 commit comments