Skip to content

Commit 02cfc3a

Browse files
committed
Remove the import *. Explicitly import what we want to expose.
Before __all__ was used to manage these. But it's clearer to just import what we want users to see.
1 parent 94276c3 commit 02cfc3a

File tree

1 file changed

+9
-35
lines changed

1 file changed

+9
-35
lines changed

plotly/graph_objs/__init__.py

Lines changed: 9 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -5,40 +5,14 @@
55
This package imports definitions for all of Plotly's graph objects. For more
66
information, run help(Obj) on any of the following objects defined here.
77
8+
The reason for the package graph_objs and the module graph_objs is to provide
9+
a clearer API for users.
810
911
"""
10-
from __future__ import absolute_import
11-
12-
from plotly.graph_objs.graph_objs import *
13-
14-
__all__ = ["Data",
15-
"Annotations",
16-
"Area",
17-
"Bar",
18-
"Box",
19-
"Contour",
20-
"Heatmap",
21-
"Histogram",
22-
"Histogram2d",
23-
"Histogram2dContour",
24-
"Scatter",
25-
"Annotation",
26-
"AngularAxis",
27-
"ColorBar",
28-
"Contours",
29-
"ErrorX",
30-
"ErrorY",
31-
"Figure",
32-
"Font",
33-
"Layout",
34-
"Legend",
35-
"Line",
36-
"Margin",
37-
"Marker",
38-
"RadialAxis",
39-
"Stream",
40-
"Trace",
41-
"XAxis",
42-
"XBins",
43-
"YAxis",
44-
"YBins"]
12+
from . graph_objs import (
13+
Data, Annotations, Area, Bar, Box, Contour, Heatmap, Histogram,
14+
Histogram2d, Histogram2dContour, Scatter, Annotation, AngularAxis,
15+
ColorBar, Contours, ErrorX, ErrorY, Figure, Font, Layout, Legend,
16+
Line, Margin, Marker, RadialAxis, Stream, Trace, XAxis, XBins, YAxis,
17+
YBins
18+
)

0 commit comments

Comments
 (0)