@@ -12,7 +12,7 @@ class MetaImages:
12
12
def __init__ (self , dockerhub_data ) -> None :
13
13
"""Create a MetaImage object to handle multi-arch docker registry images in a single point"""
14
14
# Raw data
15
- self .__dockerhub_images : List [Dict [str , Optional [str , int ]]] = dockerhub_data .get ('images' , {})
15
+ self .__dockerhub_images : List [Dict [str , Optional [Union [ str , int ] ]]] = dockerhub_data .get ('images' , {})
16
16
# Attributes
17
17
self .name : str = dockerhub_data .get ('name' , '' )
18
18
self .multi_arch : bool = len (self .__dockerhub_images ) > 1
@@ -58,7 +58,7 @@ def tagNameParsing(tag_name: str) -> str:
58
58
return version
59
59
60
60
@staticmethod
61
- def parseArch (docker_image : Union [Dict [str , Any ], Image ]) -> str :
61
+ def parseArch (docker_image : Union [Dict [str , Optional [ Union [ str , int ]] ], Image ]) -> str :
62
62
"""Parse and format arch in dockerhub style from registry dict struct.
63
63
Return arch in format 'arch/variant'."""
64
64
arch_key = "architecture"
@@ -68,7 +68,7 @@ def parseArch(docker_image: Union[Dict[str, Any], Image]) -> str:
68
68
docker_image = docker_image .attrs
69
69
arch_key = "Architecture"
70
70
variant_key = "Variant"
71
- arch = docker_image .get (arch_key , "amd64" )
71
+ arch = str ( docker_image .get (arch_key , "amd64" ) )
72
72
variant = docker_image .get (variant_key )
73
73
if variant :
74
74
arch += f"/{ variant } "
0 commit comments