Skip to content

Commit 22b8b90

Browse files
Allow numbers in to_constant
Enums aren't effected if a int is passed along with the string.
1 parent b431bfe commit 22b8b90

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

graphene/utils/str_converters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ def to_snake_case(name):
1818

1919

2020
def to_const(string):
21-
return re.sub('[\W|^(?=\d)]+', '_', string).upper()
21+
return re.sub('[\W|^]+', '_', string).upper()

0 commit comments

Comments
 (0)