Skip to content

Commit 744bae2

Browse files
committed
suggested fixes + pep8 in sf.py
1 parent a3763f5 commit 744bae2

File tree

2 files changed

+19
-17
lines changed

2 files changed

+19
-17
lines changed

src/sage/algebras/iwahori_hecke_algebra.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2786,7 +2786,7 @@ def __init__(self, W):
27862786
self.u_inv = normalized_laurent_polynomial(base_ring, u**-1)
27872787
self.v_inv = normalized_laurent_polynomial(base_ring, v**-1)
27882788

2789-
self._shorthands = ('C', 'Cp', 'T',)
2789+
self._shorthands = ('C', 'Cp', 'T')
27902790

27912791
if W.is_finite():
27922792
self._category = FiniteDimensionalAlgebrasWithBasis(base_ring)

src/sage/combinat/sf/sf.py

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"""
33
Symmetric functions, with their multiple realizations
44
"""
5-
#*****************************************************************************
5+
# ***************************************************************************
66
# Copyright (C) 2007 Mike Hansen <[email protected]>
77
# 2009-2012 Jason Bandlow <[email protected]>
88
# 2012 Anne Schilling <anne at math.ucdavis.edu>
@@ -18,8 +18,8 @@
1818
#
1919
# The full text of the GPL is available at:
2020
#
21-
# http://www.gnu.org/licenses/
22-
#*****************************************************************************
21+
# https://www.gnu.org/licenses/
22+
# ***************************************************************************
2323
from sage.categories.fields import Fields
2424
from sage.categories.graded_hopf_algebras import GradedHopfAlgebras
2525
from sage.categories.principal_ideal_domains import PrincipalIdealDomains
@@ -885,7 +885,7 @@ def a_realization(self):
885885
"""
886886
return self.schur()
887887

888-
def _repr_(self): # could be taken care of by the category
888+
def _repr_(self): # could be taken care of by the category
889889
r"""
890890
Representation of ``self``
891891
@@ -907,7 +907,7 @@ def schur(self):
907907
"""
908908
return schur.SymmetricFunctionAlgebra_schur(self)
909909
s = schur
910-
Schur = schur # Currently needed by SymmetricFunctions.__init_extra__
910+
Schur = schur # Currently needed by SymmetricFunctions.__init_extra__
911911

912912
def powersum(self):
913913
r"""
@@ -920,7 +920,8 @@ def powersum(self):
920920
"""
921921
return powersum.SymmetricFunctionAlgebra_power(self)
922922
p = powersum
923-
power = powersum # Todo: get rid of this one when it won't be needed anymore
923+
power = powersum
924+
# Todo: get rid of the line above when it won't be needed anymore
924925

925926
def complete(self):
926927
r"""
@@ -1321,7 +1322,7 @@ def jack(self, t='t'):
13211322
sage: JQp = Sym.jack().Qp(); JQp
13221323
Symmetric Functions over Fraction Field of Univariate Polynomial Ring in t over Rational Field in the Jack Qp basis
13231324
"""
1324-
return jack.Jack( self, t=t )
1325+
return jack.Jack(self, t=t)
13251326

13261327
def abreu_nigro(self, q='q'):
13271328
"""
@@ -1345,7 +1346,7 @@ def zonal(self):
13451346
sage: SymmetricFunctions(QQ).zonal()
13461347
Symmetric Functions over Rational Field in the zonal basis
13471348
"""
1348-
return jack.SymmetricFunctionAlgebra_zonal( self )
1349+
return jack.SymmetricFunctionAlgebra_zonal(self)
13491350

13501351
def llt(self, k, t='t'):
13511352
"""
@@ -1369,7 +1370,7 @@ def llt(self, k, t='t'):
13691370
sage: llt3.hcospin()
13701371
Symmetric Functions over Fraction Field of Univariate Polynomial Ring in t over Rational Field in the level 3 LLT cospin basis
13711372
"""
1372-
return llt.LLT_class( self, k, t=t )
1373+
return llt.LLT_class(self, k, t=t)
13731374

13741375
def from_polynomial(self, f):
13751376
"""
@@ -1430,8 +1431,9 @@ def register_isomorphism(self, morphism, only_conversion=False):
14301431
else:
14311432
morphism.codomain().register_coercion(morphism)
14321433

1434+
# keep them sorted in alphabetic order
14331435
_shorthands = ('e', 'f', 'h', 'm', 'p', 's')
1434-
_shorthands_all = tuple(sorted(_shorthands + ('ht', 'o', 'sp', 'st', 'w')))
1436+
_shorthands_all = ('e', 'f', 'h', 'ht', 'm', 'o', 'p', 's', 'sp', 'st', 'w')
14351437

14361438
def __init_extra__(self):
14371439
"""
@@ -1452,11 +1454,11 @@ def __init_extra__(self):
14521454
sage: f(p.an_element()) == p.an_element()
14531455
True
14541456
"""
1455-
#powersum = self.powersum ()
1456-
#complete = self.complete ()
1457-
#elementary = self.elementary()
1458-
#schur = self.schur ()
1459-
#monomial = self.monomial ()
1457+
# powersum = self.powersum ()
1458+
# complete = self.complete ()
1459+
# elementary = self.elementary()
1460+
# schur = self.schur ()
1461+
# monomial = self.monomial ()
14601462

14611463
iso = self.register_isomorphism
14621464

@@ -1465,7 +1467,7 @@ def __init_extra__(self):
14651467
for (basis1_name, basis2_name) in conversion_functions:
14661468
basis1 = getattr(self, basis1_name)()
14671469
basis2 = getattr(self, basis2_name)()
1468-
on_basis = SymmetricaConversionOnBasis(t=conversion_functions[basis1_name,basis2_name], domain=basis1, codomain=basis2)
1470+
on_basis = SymmetricaConversionOnBasis(t=conversion_functions[basis1_name, basis2_name], domain=basis1, codomain=basis2)
14691471
from sage.rings.rational_field import RationalField
14701472
if basis2_name != "powersum" or self._base.has_coerce_map_from(RationalField()):
14711473
iso(basis1._module_morphism(on_basis, codomain=basis2))

0 commit comments

Comments
 (0)