@@ -6,8 +6,7 @@ def check_registry_entry(name,version,entry,dump=True):
6
6
+ f"'{ name } -{ version } ', entry:\n { entry } " )
7
7
8
8
if dump :
9
- print ("Package:" , name )
10
- print (" Version:" , version )
9
+ print (f"Package: { name } Version: { version } " )
11
10
12
11
# Required keys
13
12
for key in ["git" ]:
@@ -35,30 +34,30 @@ def check_fpm_toml(contents):
35
34
fpm_info = {}
36
35
37
36
# Must be present, copied to json
38
- requiredKeys = ["name" , "version" , "license" , "author" ,
37
+ required_keys = ["name" , "version" , "license" , "author" ,
39
38
"maintainer" , "copyright" ]
40
39
41
40
# Optionally present, copied to json
42
- optionalKeys = ["description" , "executable" , "dependencies" ,
41
+ optional_keys = ["description" , "executable" , "dependencies" ,
43
42
"dev-dependencies" ]
44
43
45
44
# Optionally present, not copied to json
46
- otherKeys = ["test" , "library" ]
45
+ other_keys = ["test" , "library" ]
47
46
48
47
# Check for required keys
49
- for key in requiredKeys :
48
+ for key in required_keys :
50
49
if key not in p :
51
50
raise Exception (f"Missing required key '{ key } ' in fpm.toml." )
52
51
53
52
for key in p .keys ():
54
- if key not in requiredKeys + optionalKeys + otherKeys :
53
+ if key not in required_keys + optional_keys + other_keys :
55
54
print (f" (!) Warning: unexpected key '{ key } ; in fpm.toml" )
56
55
57
56
# Copy keys to dict for json index
58
- for key in requiredKeys :
57
+ for key in required_keys :
59
58
fpm_info [key ] = p [key ]
60
59
61
- for key in optionalKeys :
60
+ for key in optional_keys :
62
61
if key in p :
63
62
fpm_info [key ] = p [key ]
64
63
else :
0 commit comments