We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a8ad575 commit a091cbcCopy full SHA for a091cbc
dash/development/_py_prop_typing.py
@@ -3,8 +3,7 @@
3
import string
4
import textwrap
5
import importlib
6
-
7
-import stringcase
+import re
8
9
10
shapes = {}
@@ -52,9 +51,15 @@ def generate_any(*_):
52
51
return "typing.Any"
53
54
+def pascal_case(name: str):
55
+ return name[0].upper() + re.sub(
56
+ r"[\-_\.\s]([a-z])", lambda match: match.group(1).upper(), name[1:]
57
+ )
58
+
59
60
def generate_shape(type_info, component_name: str, prop_name: str):
61
props = []
- name = stringcase.pascalcase(prop_name)
62
+ name = pascal_case(prop_name)
63
64
for prop_key, prop_type in type_info["value"].items():
65
typed = get_prop_typing(
requirements/install.txt
@@ -7,4 +7,3 @@ requests
retrying
nest-asyncio
setuptools
-stringcase>=1.2.0
0 commit comments