File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -169,10 +169,10 @@ def guess_type_from_value(value):
169169 Returns:
170170 {str} -- string of the builtin type or None if one cannot be found
171171 """
172- if value is None :
172+ if value is None or not isinstance ( value , str ) :
173173 return None
174174
175- first_char = value [0 ]
175+ first_char = value [0 : 1 ]
176176
177177 if is_numeric (value ):
178178 return "number"
@@ -402,7 +402,7 @@ def process_variable(self, variable):
402402 params ['default' ] = pieces [1 ].strip ()
403403
404404 params ['name' ] = variable
405- params ['type' ] = guess_type_from_value (params [ 'default' ] ) or guess_type_from_name (variable )
405+ params ['type' ] = guess_type_from_value (params . get ( 'default' ) ) or guess_type_from_name (variable )
406406
407407 return params
408408
Original file line number Diff line number Diff line change 2424
2525 setup (
2626 name = 'DocBlockr Python' ,
27- version = '1.4.0 ' ,
27+ version = '1.5.1 ' ,
2828 description = '' ,
2929 author = 'Adam Bullmer' ,
3030 author_email = 'psycodrumfreak@gmail.com' ,
You can’t perform that action at this time.
0 commit comments