Squashed 'wrap/' changes from 91f3835a8..aae9b4605

aae9b4605 Merge pull request #40 from borglab/fix/instantiation-capital
dc8c67843 fix template instantiation capitalization

git-subtree-dir: wrap
git-subtree-split: aae9b4605b1a95fd0165f8ec3fede1fb7ffcb9c1
release/4.3a0
Varun Agrawal 2021-03-13 18:56:36 -05:00
parent ec48b14d70
commit a30574fdff
1 changed files with 7 additions and 2 deletions

View File

@ -124,9 +124,14 @@ def instantiate_name(original_name, instantiations):
namespaces, but I find that too verbose.
"""
inst_name = ''
instantiated_names = []
for inst in instantiations:
# Ensure the first character of the type is capitalized
name = inst.instantiated_name()
# Using `capitalize` on the complete causes other caps to be lower case
instantiated_names.append(name.replace(name[0], name[0].capitalize()))
return "{}{}".format(original_name, "".join(
[inst.instantiated_name().capitalize() for inst in instantiations]))
return "{}{}".format(original_name, "".join(instantiated_names))
class InstantiatedMethod(parser.Method):