From faf8a41118555c715c3a56b8371ab33b654fe9ab Mon Sep 17 00:00:00 2001 From: Adam Donahue Date: Tue, 27 Jun 2017 18:22:22 -0400 Subject: [PATCH] Fix to comments. --- graphene/utils/str_converters.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/graphene/utils/str_converters.py b/graphene/utils/str_converters.py index 5d3d2fad..0b1bb28d 100644 --- a/graphene/utils/str_converters.py +++ b/graphene/utils/str_converters.py @@ -5,7 +5,7 @@ def to_camel_case(snake_str): """ Return a camel-cased version of a snake-cased string. - Leading underscores and multiple-underscores are kept + Leading underscores and multiple consecutive underscores are kept intact. :param snake_str: A snake-cased string. @@ -16,13 +16,13 @@ def to_camel_case(snake_str): # component. snake_case_sub_strings = re.findall(r'(_*[a-zA-Z]+|_+$)', snake_str) - # The first variable is unchanged case wise (and leading + # The first variable is unchanged case-wise (and leading # underscores preserved as-is). camel_case_sub_strings = [snake_case_sub_strings[0]] for s in snake_case_sub_strings[1:]: # We reset the camel casing algorithm if more than one - # underscore is encountered. The endwiths handles any + # underscore is encountered. The endswith handles any # trailing underscores in the original snake-cased # variable. if s.startswith('__') or s.endswith('_'):