Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Feb 1, 2023. It is now read-only.

Commit3b24965

Browse files
author
Release Manager
committed
Trac #34893: fix and activate pycodestyle E211
this one is about wrong space before opening parentheses:E211 whitespace before '('URL:https://trac.sagemath.org/34893Reported by: chapotonTicket author(s): Frédéric ChapotonReviewer(s): Martin Rubey
2 parents6084109 +cb605f0 commit3b24965

File tree

18 files changed

+92
-83
lines changed

18 files changed

+92
-83
lines changed

‎src/sage/algebras/lie_conformal_algebras/graded_lie_conformal_algebra.py‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -110,23 +110,23 @@ def __init__(self, R, s_coeff, index_set=None, central_elements=None,
110110
sage: V = lie_conformal_algebras.Virasoro(QQ)
111111
sage: TestSuite(V).run()
112112
"""
113-
is_super=kwds.get('super',None)
113+
is_super=kwds.get('super',None)
114114
default_category=LieConformalAlgebras(R).WithBasis().FinitelyGenerated().Graded()
115115
ifis_superorparity:
116116
category=default_category.Super().or_subcategory(category)
117117
else:
118118
category=default_category.or_subcategory(category)
119119

120-
LieConformalAlgebraWithStructureCoefficients.__init__(self,R,
121-
s_coeff,index_set=index_set,central_elements=central_elements,
120+
LieConformalAlgebraWithStructureCoefficients.__init__(self,R,
121+
s_coeff,index_set=index_set,central_elements=central_elements,
122122
category=category,prefix=prefix,
123123
names=names,latex_names=latex_names,parity=parity,**kwds)
124124

125125
ifweightsisNone:
126-
weights= (1,)* (len(self._generators)-
127-
len(self.central_elements()))
128-
iflen(weights)!= (len(self._generators)-
129-
len(self.central_elements())):
130-
raiseValueError("weights and (non-central) generator lists "\
126+
weights= (1,)* (len(self._generators)-
127+
len(self.central_elements()))
128+
iflen(weights)!= (len(self._generators)-
129+
len(self.central_elements())):
130+
raiseValueError("weights and (non-central) generator lists "
131131
"must be of same length")
132132
self._weights=weights

‎src/sage/coding/punctured_code.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ def __init__(self, C, positions):
131131
"""
132132
ifnotisinstance(positions, (Integer,int,set,list)):
133133
raiseTypeError("positions must be either a Sage Integer, a Python int, a set or a list")
134-
ifisinstance(positions, (list,set))andnotall(isinstance(i, (int,Integer))foriinpositions):
135-
raiseTypeError("if positions is a list or a set, it has to contain only Python ints or Sage Integers")
134+
ifisinstance(positions, (list,set))andnotall(isinstance(i, (int,Integer))foriinpositions):
135+
raiseTypeError("if positions is a list or a set, it has to contain only Python ints or Sage Integers")
136136
ifisinstance(positions, (Integer,int)):
137137
positions= {positions}
138138
ifisinstance(positions,list):

‎src/sage/combinat/cluster_algebra_quiver/mutation_type.py‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -896,8 +896,8 @@ def _connected_mutation_type_AAtildeD(dg, ret_conn_vert=False):
896896
dg_tmp.delete_vertices(c1 )
897897

898898
components=dg_tmp.connected_components()
899-
#if not len(components) == 2:
900-
iflen (components)!=2:
899+
#if not len(components) == 2:
900+
iflen(components)!=2:
901901
return_false_return(4)
902902
else:
903903
dg_tmp1=dg_tmp.subgraph(components[0] )
@@ -938,7 +938,7 @@ def _connected_mutation_type_AAtildeD(dg, ret_conn_vert=False):
938938
c2.reverse()
939939
dg_tmp.delete_edge(tuple(c2 ) )
940940
components=dg_tmp.connected_components()
941-
iflen (components)!=2:
941+
iflen(components)!=2:
942942
return_false_return(7)
943943
else:
944944
dg_tmp1=dg_tmp.subgraph(components[0] )
@@ -1211,8 +1211,8 @@ def _connected_mutation_type_AAtildeD(dg, ret_conn_vert=False):
12111211
else:
12121212
cycle.remove(edge)
12131213
cycle.append( (edge[0],edge[1],1 ) )
1214-
r=sum ((x[2]forxincycle))
1215-
r=max (r,n-r)
1214+
r=sum(x[2]forxincycle)
1215+
r=max(r,n-r)
12161216
ifret_conn_vert:
12171217
return [QuiverMutationType( ['A',[r,n-r],1] ),connecting_vertices ]
12181218
else:

‎src/sage/combinat/crystals/alcove_path.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,7 @@ def _folding_data(self, i):
849849
ifj==len(J)-1:
850850
c2=max_height_Beta
851851
else:
852-
c2=min(max_height_Beta,J[j+1]._cmp_v[0]*max_height_Beta+1)
852+
c2=min(max_height_Beta,J[j+1]._cmp_v[0]*max_height_Beta+1)
853853

854854
forkinrange(int(c1),int(c2)):
855855

@@ -1045,7 +1045,7 @@ def f(self, i):
10451045
ifm_index<len(positions):# if m_index != 'infinity'
10461046
# thus positions[m_index] makes sense
10471047
J.remove(positions[m_index])
1048-
return_value=Parent (tuple(sorted(J) ))
1048+
return_value=Parent(tuple(sorted(J)))
10491049

10501050
# we attach to each admissible sequence a list
10511051
# which encodes a path (via root operators) from the generator ()

‎src/sage/combinat/crystals/littelmann_path.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1168,9 +1168,9 @@ def stretch_short_root(a):
11681168
else:
11691169
returns
11701170
else:
1171-
s=sum((1-scalars[i])*c_weight.scalar(dualize(Qd.sum(stretch_short_root(root)forrootinpaths_labels[i])) )foriinrange(len(paths_labels)))
1171+
s=sum((1-scalars[i])*c_weight.scalar(dualize(Qd.sum(stretch_short_root(root)forrootinpaths_labels[i])) )foriinrange(len(paths_labels)))
11721172
ifct.dual().type()=='BC':
1173-
returns/2
1173+
returns/2
11741174
else:
11751175
returns
11761176

‎src/sage/combinat/ncsf_qsym/generic_basis_code.py‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1076,12 +1076,15 @@ def __init__(self, domain, on_generators, position = 0, codomain = None, categor
10761076
assertcodomainisnotNone
10771077
ifcategoryisNone:
10781078
ifanti:
1079-
category=ModulesWithBasis(domain.base_ring())
1079+
category=ModulesWithBasis(domain.base_ring())
10801080
else:
10811081
category=AlgebrasWithBasis(domain.base_ring())
10821082
self._anti=anti
10831083
self._on_generators=on_generators
1084-
ModuleMorphismByLinearity.__init__(self,domain=domain,codomain=codomain,position=position,category=category)
1084+
ModuleMorphismByLinearity.__init__(self,domain=domain,
1085+
codomain=codomain,
1086+
position=position,
1087+
category=category)
10851088

10861089
def__eq__(self,other):
10871090
"""

‎src/sage/combinat/root_system/cartan_type.py‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -828,11 +828,12 @@ def _samples(self):
828828
['E', 6, 1], ['E', 7, 1], ['E', 8, 1], ['F', 4, 1], ['G', 2, 1], ['BC', 1, 2], ['BC', 5, 2],
829829
['B', 5, 1]^*, ['C', 4, 1]^*, ['F', 4, 1]^*, ['G', 2, 1]^*, ['BC', 1, 2]^*, ['BC', 5, 2]^*]
830830
"""
831-
finite_crystallographic= \
832-
[CartanType(t)fortin [['A',1], ['A',5], ['B',1], ['B',5],
833-
['C',1], ['C',5], ['D',2], ['D',3], ['D',5],
834-
["E",6], ["E",7], ["E",8],
835-
["F",4], ["G",2]]]
831+
finite_crystallographic= [CartanType(t)
832+
fortin [['A',1], ['A',5], ['B',1], ['B',5],
833+
['C',1], ['C',5], ['D',2], ['D',3], ['D',5],
834+
["E",6], ["E",7], ["E",8],
835+
["F",4],
836+
["G",2]]]
836837

837838
# Support for hand constructed Dynkin diagrams as Cartan types is not yet ready enough for including an example here.
838839
# from sage.combinat.root_system.dynkin_diagram import DynkinDiagram_class

‎src/sage/combinat/root_system/non_symmetric_macdonald_polynomials.py‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1233,7 +1233,6 @@ def __init__(self, KL, q, q1, q2, normalized):
12331233
Traceback (most recent call last):
12341234
...
12351235
AssertionError: The weight lattice needs to be extended!
1236-
12371236
"""
12381237
# TODO: check all the choices!
12391238
self._KL=KL
@@ -1243,9 +1242,9 @@ def __init__(self, KL, q, q1, q2, normalized):
12431242
self._q1=q1
12441243
self._q2=q2
12451244
assertself.L_prime().classical()isself.L().classical()
1246-
T=KL.twisted_demazure_lusztig_operators (q1,q2,convention="dominant")
1245+
T=KL.twisted_demazure_lusztig_operators(q1,q2,convention="dominant")
12471246
T_Y=KL.demazure_lusztig_operators_on_classical(q,q1,q2,convention="dominant")
1248-
CherednikOperatorsEigenvectors.__init__(self,T,T_Y,normalized=normalized)
1247+
CherednikOperatorsEigenvectors.__init__(self,T,T_Y,normalized=normalized)
12491248

12501249
def_repr_(self):
12511250
r"""

‎src/sage/combinat/root_system/root_lattice_realizations.py‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ def _test_root_lattice_realization(self, **options):
325325

326326
# Check the embeddings from the root lattice and the root space over the same base ring
327327
root_lattice=self.root_system.root_lattice()
328-
root_space=self.root_system.root_space(R)
328+
root_space=self.root_system.root_space(R)
329329
tester.assertIsNot(self.coerce_map_from(root_lattice),None)
330330
tester.assertIsNot(self.coerce_map_from(root_space),None)
331331
foriinself.index_set():
@@ -2925,20 +2925,20 @@ def plot_alcove_walk(self, word, start=None, foldings=None, color="orange", **op
29252925
iffoldingsisNone:
29262926
foldings= [False]*len(word)
29272927
w=W.one()
2928-
source=plot_options.projection(start)
2928+
source=plot_options.projection(start)
29292929
G=plot_options.empty()
29302930
for (i,folding)inzip(word,foldings):
29312931
w=w*s[i]
29322932
target=plot_options.projection(w.action(start))
29332933
iffolding:
2934-
middle= (source+target)/2
2935-
G+=line([source,middle],rgbcolor=color)
2934+
middle= (source+target)/2
2935+
G+=line([source,middle],rgbcolor=color)
29362936
G+=arrow(middle,source,rgbcolor=color,arrowsize=plot_options._arrowsize)
29372937
# reset w
29382938
w=w*s[i]
29392939
else:
29402940
G+=arrow(source,target,rgbcolor=color,arrowsize=plot_options._arrowsize)
2941-
source=target
2941+
source=target
29422942
returnG
29432943

29442944
@cached_method

‎src/sage/combinat/sf/sfa.py‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2344,14 +2344,14 @@ def _invert_morphism(self, n, base_ring, self_to_other_cache, other_to_self_cach
23442344

23452345
foriinrange(len_pn):
23462346
forjinrange(len_pn):
2347-
ifinverse[i,j]!=zero:
2347+
ifinverse[i,j]!=zero:
23482348
ifhasattr(self,'_normalize_coefficients'):
2349-
unknown_cache_n[pn[i] ][pn[j] ]=self._normalize_coefficients(inverse[i,j])
2349+
unknown_cache_n[pn[i] ][pn[j] ]=self._normalize_coefficients(inverse[i,j])
23502350
else:
2351-
unknown_cache_n[pn[i] ][pn[j] ]=inverse[i,j]
2351+
unknown_cache_n[pn[i] ][pn[j] ]=inverse[i,j]
23522352

2353-
known_cache[n ]=known_cache_n
2354-
unknown_cache[n]=unknown_cache_n
2353+
known_cache[n]=known_cache_n
2354+
unknown_cache[n]=unknown_cache_n
23552355

23562356
defsymmetric_function_ring(self):
23572357
r"""

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp