Browse Source

fix: use if instead of elif

tags/v0.5.0
mingrammer 4 years ago
parent
commit
2366fe7f11
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      scripts/generate.py

+ 1
- 1
scripts/generate.py View File

@@ -19,7 +19,7 @@ def load_tmpl(tmpl: str) -> Template:
def up_or_title(pvd: str, s: str) -> str: def up_or_title(pvd: str, s: str) -> str:
if s in cfg.UPPER_WORDS.get(pvd, ()): if s in cfg.UPPER_WORDS.get(pvd, ()):
return s.upper() return s.upper()
elif s in cfg.TITLE_WORDS.get(pvd, {}):
if s in cfg.TITLE_WORDS.get(pvd, {}):
return cfg.TITLE_WORDS[pvd][s] return cfg.TITLE_WORDS[pvd][s]
return s.title() return s.title()




Loading…
Cancel
Save