File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -169,10 +169,10 @@ def guess_type_from_value(value):
169
169
Returns:
170
170
{str} -- string of the builtin type or None if one cannot be found
171
171
"""
172
- if value is None :
172
+ if value is None or not isinstance ( value , str ) :
173
173
return None
174
174
175
- first_char = value [0 ]
175
+ first_char = value [0 : 1 ]
176
176
177
177
if is_numeric (value ):
178
178
return "number"
@@ -402,7 +402,7 @@ def process_variable(self, variable):
402
402
params ['default' ] = pieces [1 ].strip ()
403
403
404
404
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 )
406
406
407
407
return params
408
408
Original file line number Diff line number Diff line change 24
24
25
25
setup (
26
26
name = 'DocBlockr Python' ,
27
- version = '1.4.0 ' ,
27
+ version = '1.5.1 ' ,
28
28
description = '' ,
29
29
author = 'Adam Bullmer' ,
30
30
author_email = 'psycodrumfreak@gmail.com' ,
You can’t perform that action at this time.
0 commit comments