Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/sage/all_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ def test_import_sage_all_in_fresh_interpreter():

proc = subprocess.run(
[sys.executable, "-c", "import sage.all"],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
capture_output=True,
env=env,
text=True, check=False,
)
Expand Down
2 changes: 1 addition & 1 deletion src/sage/doctest/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def _proc_stat_cpu_seconds(self, path):

"""
try:
with open(path, "r") as statfile:
with open(path) as statfile:
stats = statfile.read().split()
except (FileNotFoundError, PermissionError) as e:
# FileNotFoundError: bad PID, or no /proc support
Expand Down
2 changes: 1 addition & 1 deletion src/sage/matroids/chow_ring_ideal.py
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,7 @@ def _latex_(self) -> str:
'I_{FY}(\\text{\\texttt{Graphic{ }matroid{ }of{ }rank{ }2{ }on{ }3{ }elements}})'
"""
from sage.misc.latex import latex
return 'I_{{FY}}({})'.format((latex(self._matroid)))
return 'I_{{FY}}({})'.format(latex(self._matroid))

def groebner_basis(self, algorithm='', *args, **kwargs):
r"""
Expand Down
2 changes: 1 addition & 1 deletion src/sage/rings/lazy_species.py
Original file line number Diff line number Diff line change
Expand Up @@ -1173,7 +1173,7 @@ def coeff(g, i):

def flat(g):
# function needed to work around python's scoping rules
return itertools.chain.from_iterable((coeff(g, j) for j in itertools.count()))
return itertools.chain.from_iterable(coeff(g, j) for j in itertools.count())

args_flat1 = [lazy_list(flat(g)) for g in args]

Expand Down
2 changes: 1 addition & 1 deletion src/sage/rings/padics/witt_vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ def _int_to_vector(self, k, parent):
if p == 2:
vec_k = (
parent(vec_k)
* parent((tuple(-1 for _ in range(self._prec))))
* parent(tuple(-1 for _ in range(self._prec)))
).coordinates()
else:
vec_k = (-x for x in vec_k)
Expand Down
2 changes: 1 addition & 1 deletion src/sage/rings/polynomial/multi_polynomial_sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -1313,7 +1313,7 @@ def __add__(self, right):
if isinstance(right, PolynomialSequence_generic) and right.ring() == self.ring():
return PolynomialSequence(self.ring(), self.parts() + right.parts())

elif isinstance(right, (tuple, list)) and all((x.parent() == self.ring() for x in right)):
elif isinstance(right, (tuple, list)) and all(x.parent() == self.ring() for x in right):
return PolynomialSequence(self.ring(), self.parts() + (right,))

elif isinstance(right, MPolynomialIdeal) and (right.ring() is self.ring() or right.ring() == self.ring()):
Expand Down
Loading