Skip to content

Commit 486b81d

Browse files
committed
Fix undefined reference to __version__ in setup.py. Pylint showed an undefined variable error. You can test this fix by changing the 'version' in version.py or setup.py and then running from the command line: python3 setup.py --version Also a few other pylint fixes.
1 parent fed867a commit 486b81d

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

plotly/grid_objs/grid_objs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ def __init__(self, columns_or_json, fid=None):
207207
ordered_columns.append(Column(
208208
columns_or_json['cols'][column_name]['data'],
209209
column_name)
210-
)
210+
)
211211
self._columns = ordered_columns
212212

213213
# fill in column_ids

plotly/plotly/plotly.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ def sign_in(username, api_key, **kwargs):
6666
except exceptions.PlotlyRequestError:
6767
raise exceptions.PlotlyError('Sign in failed.')
6868

69+
6970
update_plot_options = session.update_session_plot_options
7071

7172

plotly/tests/test_optional/test_matplotlylib/data/scatter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Marker, Scatter, XAxis, YAxis)
55

66
D = dict(
7-
x1=[1, 2, 2, 4, 5, 6, 1, 7, 8, 5 ,3],
7+
x1=[1, 2, 2, 4, 5, 6, 1, 7, 8, 5, 3],
88
y1=[5, 3, 7, 2, 9, 7, 8, 4, 5, 9, 2],
99
x2=[-1, 1, -0.3, -0.6, 0.4, 0.8, -0.1, 0.7],
1010
y2=[-0.5, 0.4, 0.7, -0.6, 0.3, -1, 0, 0.3]

setup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from setuptools import setup
22

3-
exec(open('plotly/version.py').read())
3+
main_ns = {}
4+
exec(open('plotly/version.py').read(), main_ns)
45

56

67
def readme():
@@ -9,7 +10,7 @@ def readme():
910

1011

1112
setup(name='plotly',
12-
version=__version__,
13+
version=main_ns['__version__'],
1314
use_2to3=False,
1415
author='Chris P',
1516
author_email='chris@plot.ly',

0 commit comments

Comments
 (0)