Skip to content

Commit 80e3e60

Browse files
author
Release Manager
committed
gh-37335: some details in modules (ruff and pep) just fixing a few ruff warnings and code formatting details in the `modules` folder ### 📝 Checklist - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. URL: #37335 Reported by: Frédéric Chapoton Reviewer(s): Matthias Köppe
2 parents 217a019 + c14ad1f commit 80e3e60

File tree

6 files changed

+96
-78
lines changed

6 files changed

+96
-78
lines changed

src/sage/modules/filtered_vector_space.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -806,7 +806,7 @@ def _repr_field_name(self):
806806
return 'RR'
807807
from sage.categories.finite_fields import FiniteFields
808808
if self.base_ring() in FiniteFields():
809-
return 'GF({0})'.format(len(self.base_ring()))
809+
return 'GF({})'.format(len(self.base_ring()))
810810
else:
811811
raise NotImplementedError()
812812

src/sage/modules/fp_graded/free_element.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ def _lmul_(self, a):
193193
Sq(1,1,1)*x0 + Sq(1,1,1)*y0 + Sq(5,1)*z3,
194194
Sq(3,2)*z3]
195195
"""
196-
return self.parent()((a * c for c in self.dense_coefficient_list()))
196+
return self.parent()(a * c for c in self.dense_coefficient_list())
197197

198198
@cached_method
199199
def vector_presentation(self):

src/sage/modules/fp_graded/morphism.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1747,7 +1747,7 @@ def _resolve_kernel(self, top_dim=None, verbose=False):
17471747
if not kernel_n:
17481748
continue
17491749

1750-
generator_degrees = tuple((x.degree() for x in F_.generators()))
1750+
generator_degrees = tuple(x.degree() for x in F_.generators())
17511751

17521752
if j.is_zero():
17531753
# The map j is not onto in degree `n` of the kernel.
@@ -1875,7 +1875,7 @@ def _resolve_image(self, top_dim=None, verbose=False):
18751875
if image_n.dimension() == 0:
18761876
continue
18771877

1878-
generator_degrees = tuple((x.degree() for x in F_.generators()))
1878+
generator_degrees = tuple(x.degree() for x in F_.generators())
18791879
if j.is_zero():
18801880
# The map j is not onto in degree `n` of the image.
18811881
new_generator_degrees = image_n.rank() * (n,)

0 commit comments

Comments
 (0)