Skip to content

Commit d12bfbc

Browse files
committed
fix suggested details
1 parent 83abc46 commit d12bfbc

File tree

8 files changed

+28
-31
lines changed

8 files changed

+28
-31
lines changed

src/sage/interfaces/magma.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1305,30 +1305,28 @@ def _left_list_delim(self):
13051305
"""
13061306
Return the left sequence delimiter in Magma.
13071307
1308-
Despite the name in
1309-
this function, this is really the least painful choice.
1308+
Despite the name in this function, this is really the least
1309+
painful choice.
13101310
13111311
EXAMPLES::
13121312
13131313
sage: magma._left_list_delim()
13141314
'['
13151315
"""
1316-
# return "[*"
13171316
return "["
13181317

13191318
def _right_list_delim(self):
13201319
"""
13211320
Return the right sequence delimiter in Magma.
13221321
1323-
Despite the name in
1324-
this function, this is really the least painful choice.
1322+
Despite the name in this function, this is really the least
1323+
painful choice.
13251324
13261325
EXAMPLES::
13271326
13281327
sage: magma._right_list_delim()
13291328
']'
13301329
"""
1331-
# return "*]"
13321330
return "]"
13331331

13341332
def _assign_symbol(self):

src/sage/interfaces/matlab.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@
137137
8 1 1
138138
"""
139139

140-
##############################################################################
140+
# ****************************************************************************
141141
# Copyright (C) 2006 William Stein <[email protected]>
142142
#
143143
# Distributed under the terms of the GNU General Public License (GPL).
@@ -150,7 +150,7 @@
150150
# The full text of the GPL is available at:
151151
#
152152
# https://www.gnu.org/licenses/
153-
##############################################################################
153+
# ****************************************************************************
154154

155155
import os
156156

src/sage/interfaces/mupad.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,14 @@
8484
8585
"""
8686

87-
#############################################################################
87+
# **************************************************************************
8888
# Copyright (C) 2008 Mike Hansen <[email protected]>
8989
# William Stein <[email protected]>
9090
#
9191
# Distributed under the terms of the GNU General Public License (GPL)
9292
#
9393
# https://www.gnu.org/licenses/
94-
#############################################################################
94+
# **************************************************************************
9595

9696
import os
9797

src/sage/interfaces/polymake.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -283,10 +283,11 @@ def convert(y):
283283
k = convert(k)
284284
v = convert(v)
285285
z[k] = v
286-
A.append("{}=>{}".format(k.name(), v.name()))
286+
A.append(f"{k.name()}=>{v.name()}")
287287
r = self.new("{" + ",".join(A) + "}")
288-
r.__sage_dict = z
288+
289289
# this to avoid having the entries of the list be garbage collected
290+
r.__sage_dict = z
290291
return r
291292

292293
import sage.rings.abc
@@ -849,8 +850,9 @@ def new_object(self, name, *args, **kwds):
849850
return f(*args, **kwds)
850851

851852

852-
########################################
853-
# Elements
853+
# --------
854+
# Elements
855+
# --------
854856

855857
class PolymakeElement(ExtraTabCompletion, InterfaceElement):
856858
"""

src/sage/interfaces/r.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@
258258
- Emmanuel Charpentier (2015-12-12, RPy2 interface)
259259
"""
260260

261-
##########################################################################
261+
# ************************************************************************
262262
#
263263
# Copyright (C) 2007 William Stein <[email protected]>
264264
# 2007 Mike Hansen <[email protected]>
@@ -268,7 +268,7 @@
268268
#
269269
# https://www.gnu.org/licenses/
270270
#
271-
##########################################################################
271+
# ************************************************************************
272272
import os
273273

274274
from .interface import Interface, InterfaceElement, InterfaceFunction, InterfaceFunctionElement
@@ -486,8 +486,8 @@ def __init__(self,
486486
True
487487
"""
488488
Interface.__init__(
489-
self,
490-
name='r', # The capitalized version of this is used for printing.
489+
self,
490+
name='r', # The capitalized version of this is used for printing.
491491
)
492492
self._seed = seed
493493
self._initialized = False # done lazily
@@ -1075,7 +1075,7 @@ def function_call(self, function, args=None, kwds=None):
10751075
args, kwds = self._convert_args_kwds(args, kwds)
10761076
self._check_valid_function_name(function)
10771077
return self.new("%s(%s)" % (function, ",".join([s.name() for s in args] +
1078-
[self._sage_to_r_name(key)+'='+kwds[key].name() for key in kwds])))
1078+
[self._sage_to_r_name(key) + '=' + kwds[key].name() for key in kwds])))
10791079

10801080
def call(self, function_name, *args, **kwds):
10811081
r"""
@@ -1118,10 +1118,8 @@ def set(self, var, value):
11181118
sage: r.set('a', '2 + 3') # optional - rpy2
11191119
sage: r.get('a') # optional - rpy2
11201120
'[1] 5'
1121-
11221121
"""
1123-
cmd = '%s <- %s' % (var, value)
1124-
out = self.eval(cmd)
1122+
_ = self.eval(f'{var} <- {value}')
11251123

11261124
def get(self, var):
11271125
"""
@@ -1822,8 +1820,7 @@ def _sage_(self):
18221820
P = self.parent()
18231821

18241822
with localconverter(P._r_to_sage_converter) as cv:
1825-
parsed = robjects.r(self.name())
1826-
return parsed
1823+
return robjects.r(self.name())
18271824

18281825
def _latex_(self):
18291826
r"""

src/sage/interfaces/scilab.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,10 @@
176176
177177
AUTHORS:
178178
179-
-- Ronan Paixao (2008-11-26), based on the MATLAB tutorial by
180-
William Stein (2006-10-11)
179+
- Ronan Paixao (2008-11-26), based on the MATLAB tutorial by
180+
William Stein (2006-10-11)
181181
"""
182-
##############################################################################
182+
# ****************************************************************************
183183
# Copyright (C) 2006 William Stein <[email protected]>
184184
# Copyright (C) 2008 Ronan Paixao <[email protected]>
185185
#
@@ -193,7 +193,7 @@
193193
# The full text of the GPL is available at:
194194
#
195195
# https://www.gnu.org/licenses/
196-
##############################################################################
196+
# ****************************************************************************
197197

198198
import os
199199

src/sage/interfaces/tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def manyvars(s, num=70000, inlen=1, step=2000):
5959
v = []
6060
for i in range(num):
6161
if not i % step:
62-
sys.stdout.write('{i} ')
62+
sys.stdout.write(f'{i} ')
6363
sys.stdout.flush()
6464
v.append(s(t))
6565
print('\nsuccess -- time = cpu: %s, wall: %s' % (cputime(t),

src/sage/interfaces/tides.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212
1313
::
1414
15-
##########################################################################
15+
# ************************************************************************
1616
# Copyright (C) 2014 Miguel Marco <[email protected]>, Marcos Rodriguez
1717
1818
#
1919
# Distributed under the terms of the GNU General Public License (GPL):
2020
#
2121
# https://www.gnu.org/licenses/
22-
##########################################################################
22+
# ************************************************************************
2323
2424
AUTHORS:
2525

0 commit comments

Comments
 (0)