mirror of
https://github.com/graphql-python/graphene.git
synced 2024-11-23 01:56:54 +03:00
Allow numbers in to_constant
Enums aren't effected if a int is passed along with the string.
This commit is contained in:
parent
b431bfe477
commit
22b8b90fab
|
@ -18,4 +18,4 @@ def to_snake_case(name):
|
|||
|
||||
|
||||
def to_const(string):
|
||||
return re.sub('[\W|^(?=\d)]+', '_', string).upper()
|
||||
return re.sub('[\W|^]+', '_', string).upper()
|
||||
|
|
Loading…
Reference in New Issue
Block a user