Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 323b9ad

Browse files
committed
updated plot schema and more robust regex
1 parent 65185b0 commit 323b9ad

File tree

2 files changed

+394
-54
lines changed

2 files changed

+394
-54
lines changed

plotly/check_version.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
def get_latest():
66
data = urllib2.urlopen('https://raw.githubusercontent.com/plotly/plotly.py/master/plotly/version.py') # it's a file like object and works just like a file
77
version_string = [i for i in data][0]
8-
latest_version = re.findall(r'\'.*', version_string)[0][1:-1]
8+
latest_version = re.findall(r'\'.*\'', version_string)[0][1:-1]
99
return latest_version
1010

1111
def run_duration(f, **kwargs):
1212
import timeit
1313
start_time = timeit.default_timer()
1414
f(**kwargs)
1515
return (timeit.default_timer() - start_time)
16-
16+
1717

1818

1919

0 commit comments

Comments
 (0)