refactoring
This commit is contained in:
parent
2517b45d44
commit
4f94cbd68d
@ -10,7 +10,7 @@ class Snake2CamelCaseKeyFormatter(Formatter):
|
|||||||
|
|
||||||
if isinstance(key, str):
|
if isinstance(key, str):
|
||||||
head, *tail = key.split("_")
|
head, *tail = key.split("_")
|
||||||
return head + "".join(map(lambda s: s.title(), tail))
|
return head + "".join(map(str.title, tail))
|
||||||
else:
|
else:
|
||||||
return key
|
return key
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user