Skip to content

Commit

Permalink
Use uppercase for constant variable names.
Browse files Browse the repository at this point in the history
  • Loading branch information
rtibbles committed Dec 16, 2021
1 parent bdba056 commit 05ce482
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 23 deletions.
10 changes: 5 additions & 5 deletions js/CompletionCriteria.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
// CompletionCriteria

export default {
approx_time: "approx_time",
mastery: "mastery",
pages: "pages",
reference: "reference",
time: "time",
APPROX_TIME: "approx_time",
MASTERY: "mastery",
PAGES: "pages",
REFERENCE: "reference",
TIME: "time",
};
2 changes: 1 addition & 1 deletion js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"version": "0.1.35"
"version": "0.1.36"
}
30 changes: 15 additions & 15 deletions le_utils/constants/completion_criteria.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,24 @@

# CompletionCriteria

approx_time = "approx_time"
mastery = "mastery"
pages = "pages"
reference = "reference"
time = "time"
APPROX_TIME = "approx_time"
MASTERY = "mastery"
PAGES = "pages"
REFERENCE = "reference"
TIME = "time"

choices = (
(approx_time, "Approx Time"),
(mastery, "Mastery"),
(pages, "Pages"),
(reference, "Reference"),
(time, "Time"),
(APPROX_TIME, "Approx Time"),
(MASTERY, "Mastery"),
(PAGES, "Pages"),
(REFERENCE, "Reference"),
(TIME, "Time"),
)

COMPLETIONCRITERIALIST = [
approx_time,
mastery,
pages,
reference,
time,
APPROX_TIME,
MASTERY,
PAGES,
REFERENCE,
TIME,
]
2 changes: 1 addition & 1 deletion scripts/generate_from_specs.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def read_constants_specs():
constants_spec = json.load(json_constants_spec_file)
key = snake_to_pascal(constants_spec_file.split("-")[-1].split(".")[0])
constants_outputs[key] = OrderedDict(
[(a, a) for a in sorted(constants_spec)]
[(a.upper(), a) for a in sorted(constants_spec)]
)
return constants_outputs

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
setup(
name="le-utils",
packages=find_packages(),
version="0.1.35",
version="0.1.36",
description="LE-Utils contains shared constants used in Kolibri, Ricecooker, and Kolibri Studio.",
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down

0 comments on commit 05ce482

Please sign in to comment.