File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -170,6 +170,11 @@ class TraitError(Exception):
170170
171171
172172def isidentifier (s : t .Any ) -> bool :
173+ warn (
174+ "traitlets.traitlets.isidentifier(s) is deprecated since traitlets 5.14.4 Use `s.isidentifier()`." ,
175+ DeprecationWarning ,
176+ stacklevel = 2 ,
177+ )
173178 return t .cast (bool , s .isidentifier ())
174179
175180
@@ -3025,7 +3030,7 @@ class ObjectName(TraitType[str, str]):
30253030 def validate (self , obj : t .Any , value : t .Any ) -> str :
30263031 value = self .coerce_str (obj , value )
30273032
3028- if isinstance (value , str ) and isidentifier (value ):
3033+ if isinstance (value , str ) and value . isidentifier ():
30293034 return value
30303035 self .error (obj , value )
30313036
@@ -3041,7 +3046,7 @@ class DottedObjectName(ObjectName):
30413046 def validate (self , obj : t .Any , value : t .Any ) -> str :
30423047 value = self .coerce_str (obj , value )
30433048
3044- if isinstance (value , str ) and all (isidentifier (a ) for a in value .split ("." )):
3049+ if isinstance (value , str ) and all (a . isidentifier () for a in value .split ("." )):
30453050 return value
30463051 self .error (obj , value )
30473052
You can’t perform that action at this time.
0 commit comments