Skip to content

Commit 3a1cc90

Browse files
committed
Update: replace camel case variables.
1 parent db94de7 commit 3a1cc90

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

build_index.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@ def main():
107107
ref = None
108108

109109
# Build json index entry
110-
pkgInfoFull = check_fpm_toml(fpm_toml)
111-
pkgInfoFull["git"] = pkg_info["git"]
112-
pkgInfoFull["git-tag"] = ref
110+
pkg_info_full = check_fpm_toml(fpm_toml)
111+
pkg_info_full["git"] = pkg_info["git"]
112+
pkg_info_full["git-tag"] = ref
113113

114114
# Counting
115115
if (f"{pkg_name}" in index["packages"]
@@ -123,7 +123,7 @@ def main():
123123
if f"{pkg_name}" not in index["packages"]:
124124
index["packages"][pkg_name] = {}
125125

126-
index["packages"][pkg_name][pkg_version] = pkgInfoFull
126+
index["packages"][pkg_name][pkg_version] = pkg_info_full
127127

128128
except Exception:
129129
print(f" (!) Error processing package '"

fpm_validate.py

+8-9
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ def check_registry_entry(name,version,entry,dump=True):
66
+ f"'{name}-{version}', entry:\n {entry}")
77

88
if dump:
9-
print("Package:", name)
10-
print(" Version:", version)
9+
print(f"Package: {name} Version: {version}")
1110

1211
# Required keys
1312
for key in ["git"]:
@@ -35,30 +34,30 @@ def check_fpm_toml(contents):
3534
fpm_info = {}
3635

3736
# Must be present, copied to json
38-
requiredKeys = ["name", "version", "license", "author",
37+
required_keys = ["name", "version", "license", "author",
3938
"maintainer", "copyright"]
4039

4140
# Optionally present, copied to json
42-
optionalKeys = ["description", "executable", "dependencies",
41+
optional_keys = ["description", "executable", "dependencies",
4342
"dev-dependencies"]
4443

4544
# Optionally present, not copied to json
46-
otherKeys = ["test", "library"]
45+
other_keys = ["test", "library"]
4746

4847
# Check for required keys
49-
for key in requiredKeys:
48+
for key in required_keys:
5049
if key not in p:
5150
raise Exception(f"Missing required key '{key}' in fpm.toml.")
5251

5352
for key in p.keys():
54-
if key not in requiredKeys + optionalKeys + otherKeys:
53+
if key not in required_keys + optional_keys + other_keys:
5554
print(f" (!) Warning: unexpected key '{key}; in fpm.toml")
5655

5756
# Copy keys to dict for json index
58-
for key in requiredKeys:
57+
for key in required_keys:
5958
fpm_info[key] = p[key]
6059

61-
for key in optionalKeys:
60+
for key in optional_keys:
6261
if key in p:
6362
fpm_info[key] = p[key]
6463
else:

0 commit comments

Comments
 (0)