Skip to content

Commit 761d254

Browse files
author
Zerline
committed
Avoid deprecation warning with 'uniq'.
1 parent b6763f1 commit 761d254

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

ChangeLog

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
0.7.4:
2+
* Fixed an edition bug in a standard tableau
3+
* No more using `uniq` function
14
0.7.3:
25
* Code rewrite to make writing custom interactions easier for the user
36
* Quicker installation (not calling webpack twice)

js/lib/TextWithTooltip.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
var widgets = require('@jupyter-widgets/base');
22
var widgets = require('@jupyter-widgets/controls');
3-
var _ = require('lodash');
43

54
var TextWithTooltipView = widgets.TextView.extend({
65
render: function() {

sage_combinat_widgets/grid_view_editor.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
from sage.misc.bindable_class import BindableClass
2828
from sage.all import SageObject
2929
from sage.misc.abstract_method import AbstractMethod
30-
from sage.misc.misc import uniq
3130
MAX_LEN_HISTORY = 50
3231

3332
def extract_coordinates(s):
@@ -452,7 +451,7 @@ def set_value_from_cells(self, obj_class=None, cells={}):
452451
positions = sorted(list(cells.keys()))
453452
for cl in obj_class.__mro__:
454453
try:
455-
obj = cl([[cells[pos] for pos in positions if pos[0]==i] for i in uniq([t[0] for t in positions])])
454+
obj = cl([[cells[pos] for pos in positions if pos[0]==i] for i in set([t[0] for t in positions])])
456455
except:
457456
print("These cells cannot be turned into a %s" % cl)
458457
else:

sage_combinat_widgets/grid_view_widget.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
from .grid_view_editor import GridViewEditor, cdlink
1111
from sage.graphs.generic_graph import GenericGraph
1212
from ipywidgets import Layout, VBox, HBox, Text, HTML, ToggleButton, Button, ValueWidget, register
13-
from sage.misc.misc import uniq
1413
from six import text_type
1514
from traitlets import Unicode
1615

@@ -496,7 +495,7 @@ def draw(self, cell_widget_classes=None, cell_widget_class_index=None,
496495
addable_rows = []
497496
removable_positions = self.removable_cells()
498497
addable_rows = [(i,[pos for pos in addable_positions if pos[0]==i]) \
499-
for i in uniq([t[0] for t in addable_positions])]
498+
for i in set([t[0] for t in addable_positions])]
500499
if not cell_widget_classes:
501500
cell_widget_classes = self.cell_widget_classes
502501
if not cell_widget_class_index:

0 commit comments

Comments
 (0)