Skip to content

Commit

Permalink
Fix doctest
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Apr 24, 2017
1 parent a4db7e4 commit 7d7791a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions superset/utils.py
Expand Up @@ -134,16 +134,16 @@ def string_to_num(s):
Returns ``None`` if it can't be converted
>>> '5'
>>> string_to_num('5')
5
>>> '5.2'
>>> string_to_num('5.2')
5.2
>>> 10
>>> string_to_num(10)
10
>>> 10.1
>>> string_to_num(10.1)
10.1
>>> 'this is not a string'
None
>>> string_to_num('this is not a string') is None
True
"""
if isinstance(s, (int, float)):
return s
Expand Down

0 comments on commit 7d7791a

Please sign in to comment.