File tree 3 files changed +1
-15
lines changed
3 files changed +1
-15
lines changed Original file line number Diff line number Diff line change 1
1
import re
2
- from unidecode import unidecode
3
2
4
3
5
4
# Adapted from this response in Stackoverflow
@@ -16,7 +15,3 @@ def to_camel_case(snake_str):
16
15
def to_snake_case (name ):
17
16
s1 = re .sub ("(.)([A-Z][a-z]+)" , r"\1_\2" , name )
18
17
return re .sub ("([a-z0-9])([A-Z])" , r"\1_\2" , s1 ).lower ()
19
-
20
-
21
- def to_const (string ):
22
- return re .sub (r"[\W|^]+" , "_" , unidecode (string )).upper ()
Original file line number Diff line number Diff line change 1
1
# coding: utf-8
2
- from ..str_converters import to_camel_case , to_const , to_snake_case
2
+ from ..str_converters import to_camel_case , to_snake_case
3
3
4
4
5
5
def test_snake_case ():
@@ -17,11 +17,3 @@ def test_camel_case():
17
17
assert to_camel_case ("snakes_on_a__plane" ) == "snakesOnA_Plane"
18
18
assert to_camel_case ("i_phone_hysteria" ) == "iPhoneHysteria"
19
19
assert to_camel_case ("field_i18n" ) == "fieldI18n"
20
-
21
-
22
- def test_to_const ():
23
- assert to_const ('snakes $1. on a "#plane' ) == "SNAKES_1_ON_A_PLANE"
24
-
25
-
26
- def test_to_const_unicode ():
27
- assert to_const ("Skoða þetta unicode stöff" ) == "SKODA_THETTA_UNICODE_STOFF"
Original file line number Diff line number Diff line change @@ -85,7 +85,6 @@ def run_tests(self):
85
85
"graphql-core>=3.1.0b1,<4" ,
86
86
"graphql-relay>=3.0,<4" ,
87
87
"aniso8601>=8,<9" ,
88
- "unidecode>=1.1.1,<2" ,
89
88
],
90
89
tests_require = tests_require ,
91
90
extras_require = {"test" : tests_require , "dev" : dev_requires },
You can’t perform that action at this time.
0 commit comments