##// END OF EJS Templates
Deprecate more complicated way of defining colors. (#14305)...
M Bussonnier -
r28606:5f4d6acd merge
parent child Browse files
Show More
@@ -10,6 +10,7 b''
10
10
11
11
12 import os
12 import os
13 import warnings
13
14
14 from IPython.utils.ipstruct import Struct
15 from IPython.utils.ipstruct import Struct
15
16
@@ -116,8 +117,18 b' class ColorScheme:'
116 name: str
117 name: str
117 colors: Struct
118 colors: Struct
118
119
119 def __init__(self,__scheme_name_,colordict=None,**colormap):
120 def __init__(self, __scheme_name_, colordict=None, **colormap):
120 self.name = __scheme_name_
121 self.name = __scheme_name_
122 if colormap:
123 warnings.warn(
124 "Passing each colors as a kwarg to ColorScheme is "
125 "considered for deprecation. Please pass a "
126 "a single dict as second parameter. If you are using this"
127 "feature, please comment an subscribe to issue "
128 "https://github.com/ipython/ipython/issues/14304",
129 PendingDeprecationWarning,
130 stacklevel=2,
131 )
121 if colordict is None:
132 if colordict is None:
122 self.colors = Struct(**colormap)
133 self.colors = Struct(**colormap)
123 else:
134 else:
General Comments 0
You need to be logged in to leave comments. Login now