Skip to content

Commit fcdff66

Browse files
committed
fix warnings in coxeter_group.py
1 parent de52c5f commit fcdff66

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

src/sage/libs/coxeter3/coxeter_group.py

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
"""
44
Coxeter Groups implemented with Coxeter3
55
"""
6-
#*****************************************************************************
6+
# ****************************************************************************
77
# Copyright (C) 2009-2013 Mike Hansen <[email protected]>
88
#
99
# Distributed under the terms of the GNU General Public License (GPL)
10-
# http://www.gnu.org/licenses/
11-
#*****************************************************************************
10+
# https://www.gnu.org/licenses/
11+
# ****************************************************************************
1212

1313
from sage.libs.coxeter3.coxeter import get_CoxGroup, CoxGroupElement
1414
from sage.misc.cachefunc import cached_method
@@ -31,10 +31,10 @@ def __classcall__(cls, cartan_type, *args, **options):
3131
"""
3232
TESTS::
3333
34-
sage: from sage.libs.coxeter3.coxeter_group import CoxeterGroup # optional - coxeter3
35-
sage: CoxeterGroup(['B',2]) # optional - coxeter3
34+
sage: from sage.libs.coxeter3.coxeter_group import CoxeterGroup # optional - coxeter3
35+
sage: CoxeterGroup(['B',2]) # optional - coxeter3
3636
Coxeter group of type ['B', 2] implemented by Coxeter3
37-
sage: CoxeterGroup(CartanType(['B', 3]).relabel({1: 3, 2: 2, 3: 1})) # optional - coxeter3
37+
sage: CoxeterGroup(CartanType(['B', 3]).relabel({1: 3, 2: 2, 3: 1})) # optional - coxeter3
3838
Coxeter group of type ['B', 3] relabelled by {1: 3, 2: 2, 3: 1} implemented by Coxeter3
3939
4040
"""
@@ -46,15 +46,15 @@ def __init__(self, cartan_type):
4646
"""
4747
TESTS::
4848
49-
sage: from sage.libs.coxeter3.coxeter_group import CoxeterGroup # optional - coxeter3
50-
sage: CoxeterGroup(['A',2]) # optional - coxeter3
49+
sage: from sage.libs.coxeter3.coxeter_group import CoxeterGroup # optional - coxeter3
50+
sage: CoxeterGroup(['A',2]) # optional - coxeter3
5151
Coxeter group of type ['A', 2] implemented by Coxeter3
5252
5353
As degrees and codegrees are not implemented, they are skipped in the
5454
testsuite::
5555
5656
sage: to_skip = ['_test_degrees', '_test_codegrees']
57-
sage: TestSuite(CoxeterGroup(['A',2])).run(skip=to_skip) # optional - coxeter3
57+
sage: TestSuite(CoxeterGroup(['A',2])).run(skip=to_skip) # optional - coxeter3
5858
"""
5959
category = CoxeterGroups()
6060
if cartan_type.is_finite():
@@ -277,8 +277,8 @@ def m(self, i, j):
277277
278278
TESTS::
279279
280-
sage: W = CoxeterGroup(['A', 3], implementation='coxeter3') # optional - coxeter3
281-
sage: W.m(1, 1) # optional - coxeter3
280+
sage: W = CoxeterGroup(['A', 3], implementation='coxeter3') # optional - coxeter3
281+
sage: W.m(1, 1) # optional - coxeter3
282282
doctest:warning...:
283283
DeprecationWarning: the .m(i, j) method has been deprecated; use .coxeter_matrix()[i,j] instead.
284284
See https://github.com/sagemath/sage/issues/30237 for details.
@@ -667,7 +667,7 @@ def action(self, v):
667667
sage: w.action(v)
668668
-alpha[1] + alpha[2] + alpha[3]
669669
"""
670-
#TODO: Find a better way to do this
670+
# TODO: Find a better way to do this
671671
W = self.parent().root_system().root_space().weyl_group()
672672
w = W.from_reduced_word(list(self))
673673
return w.action(v)
@@ -705,7 +705,9 @@ def action_on_rational_function(self, f):
705705
n = W.rank()
706706

707707
if Q.ngens() != n:
708-
raise ValueError("the number of generators for the polynomial ring must be the same as the rank of the root system")
708+
raise ValueError("the number of generators for the polynomial "
709+
"ring must be the same as the rank of the "
710+
"root system")
709711

710712
basis_elements = [alpha[i] for i in W.index_set()]
711713
basis_to_order = {s: i for i, s in enumerate(W.index_set())}
@@ -716,7 +718,7 @@ def action_on_rational_function(self, f):
716718
exponents = poly.exponents()
717719

718720
for exponent in exponents:
719-
#Construct something in the root lattice from the exponent vector
721+
# Construct something in the root lattice from the exponent vector
720722
exponent = sum(e*b for e, b in zip(exponent, basis_elements))
721723
exponent = self.action(exponent)
722724

0 commit comments

Comments
 (0)