Skip to content

Commit 59396b2

Browse files
committed
minor details in modular
1 parent 0c390a0 commit 59396b2

File tree

19 files changed

+37
-37
lines changed

19 files changed

+37
-37
lines changed

src/sage/modular/arithgroup/arithgroup_generic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ def is_subgroup(self, right):
571571

572572
w = self.gens()
573573
for g in w:
574-
if not (g in right):
574+
if g not in right:
575575
return False
576576
return True
577577

src/sage/modular/arithgroup/arithgroup_perm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,7 @@ def relabel(self, inplace=True):
816816
"""
817817
if hasattr(self,'_canonical_label_group'):
818818
if inplace:
819-
if not (self is self._canonical_label_group):
819+
if self is not self._canonical_label_group:
820820
self.__dict__ = self._canonical_label_group.__dict__
821821
self._canonical_label_group = self
822822
else:
@@ -1811,7 +1811,7 @@ def cusp_widths(self,exp=False):
18111811
c1 = min(L.orbit(inv(c0)))
18121812
cusps.remove(c1)
18131813
if exp:
1814-
if not len(c) in widths:
1814+
if len(c) not in widths:
18151815
widths[len(c)] = 0
18161816
widths[len(c)] += 1
18171817
else:

src/sage/modular/arithgroup/congroup_gammaH.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1045,7 +1045,7 @@ def is_subgroup(self, other):
10451045
# difficult case
10461046
t = other._list_of_elements_in_H()
10471047
for x in self._generators_for_H():
1048-
if not (x in t):
1048+
if x not in t:
10491049
return False
10501050
return True
10511051

@@ -1402,7 +1402,7 @@ def _list_subgroup(N, gens):
14021402
raise ValueError("gen (=%s) is not in (Z/%sZ)^*" % (g, N))
14031403
gk = int(g) % N
14041404
sbgrp = [gk]
1405-
while not (gk in H):
1405+
while gk not in H:
14061406
gk = (gk * g) % N
14071407
sbgrp.append(gk)
14081408
H = {(x * h) % N for x in sbgrp for h in H}

src/sage/modular/btquotients/btquotient.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ def edge_between_vertices(self, v1, v2, normalized=False):
695695
696696
- 2x2 integer matrix, representing the edge from ``v1`` to
697697
``v2``. If ``v1`` and ``v2`` are not at distance `1`, raise
698-
a ``ValueError``.
698+
a :class:`ValueError`.
699699
700700
EXAMPLES::
701701

src/sage/modular/hecke/ambient_module.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ def degeneracy_map(self, codomain, t=1):
392392
"level (=%s) and t (=%s) must be a divisor of the quotient") % (self.level(), level, t))
393393

394394
eps = self.character()
395-
if not (eps is None) and level % eps.conductor() != 0:
395+
if eps is not None and level % eps.conductor() != 0:
396396
raise ArithmeticError("the conductor of the character of this space "
397397
"(=%s) must be divisible by the level (=%s)" % (eps.conductor(), level))
398398

src/sage/modular/hecke/module.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ def rank(self):
456456
r"""
457457
Return the rank of this module over its base ring.
458458
459-
This raises a ``NotImplementedError``, since this is an
459+
This raises a :class:`NotImplementedError`, since this is an
460460
abstract base class.
461461
462462
EXAMPLES::
@@ -473,7 +473,7 @@ def submodule(self, X):
473473
Return the submodule of ``self`` corresponding to ``X``.
474474
475475
As this is an abstract base class, this raises a
476-
``NotImplementedError``.
476+
:class:`NotImplementedError`.
477477
478478
EXAMPLES::
479479
@@ -739,7 +739,7 @@ def ambient_hecke_module(self):
739739
r"""
740740
Return the ambient module associated to this module.
741741
742-
As this is an abstract base class, raise ``NotImplementedError``.
742+
As this is an abstract base class, raise :class:`NotImplementedError`.
743743
744744
EXAMPLES::
745745
@@ -1501,7 +1501,7 @@ def is_simple(self):
15011501
Return ``True`` if this space is simple as a module for the
15021502
corresponding Hecke algebra.
15031503
1504-
Raises ``NotImplementedError``, as this is an abstract base
1504+
This raises :class:`NotImplementedError`, as this is an abstract base
15051505
class.
15061506
15071507
EXAMPLES::

src/sage/modular/hecke/submodule.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def __init__(self, ambient, submodule, dual_free_module=None, check=True):
9595
module.HeckeModule_free_module.__init__(self, ambient.base_ring(),
9696
ambient.level(),
9797
ambient.weight())
98-
if not (dual_free_module is None):
98+
if dual_free_module is not None:
9999
if not is_FreeModule(dual_free_module):
100100
raise TypeError("dual_free_module must be a free module")
101101
if dual_free_module.rank() != submodule.rank():
@@ -960,7 +960,7 @@ def submodule_from_nonembedded_module(self, V, Vdual=None, check=True):
960960
# so fast, and their are asymptotically fast algorithms.
961961
A = M_V * M_E
962962
V = A.row_space()
963-
if not (Vdual is None):
963+
if Vdual is not None:
964964
E = self.dual_free_module()
965965
M_Vdual = Vdual.matrix()
966966
M_E = E.matrix()

src/sage/modular/local_comp/smoothchar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,7 @@ def _test_unitgens(self, **options):
802802
g = I.small_residue(g)
803803
else: # I is an ideal of ZZ
804804
g = g % (I.gen())
805-
if not (g - 1 in I):
805+
if g - 1 not in I:
806806
T.fail("For generator g=%s, g^%s = %s, which is not 1 mod I" % (gens[i], exps[i], g))
807807
I = self.prime() if self.number_field() == QQ else self.ideal(1)
808808
T.assertEqual(gens[-1].valuation(I), 1)

src/sage/modular/modform/constructor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ def ModularForms(group=1,
330330

331331
if use_cache and key in _cache:
332332
M = _cache[key]()
333-
if not (M is None):
333+
if M is not None:
334334
M.set_precision(prec)
335335
return M
336336

src/sage/modular/modform/space.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ def has_character(self):
365365
sage: CuspForms(DirichletGroup(11).0,3).has_character()
366366
True
367367
"""
368-
return not self.character() is None
368+
return self.character() is not None
369369

370370
def is_ambient(self):
371371
"""
@@ -1929,6 +1929,6 @@ def contains_each(V, B):
19291929
False
19301930
"""
19311931
for b in B:
1932-
if not (b in V):
1932+
if b not in V:
19331933
return False
19341934
return True

0 commit comments

Comments
 (0)