Skip to content

Commit be31380

Browse files
authored
Merge pull request #98 from eric-wieser/fix-indentation
Fix indentation and alignment issues found by flake8
2 parents df6d338 + 37cd83a commit be31380

File tree

4 files changed

+23
-23
lines changed

4 files changed

+23
-23
lines changed

galgebra/ga.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -556,8 +556,8 @@ def mv(self, root=None, *args, **kwargs):
556556
mvtype_lst = args[0].split(' ')
557557
if len(root_lst) != len(mvtype_lst):
558558
raise ValueError('In Ga.mv() for multiple multivectors and ' +
559-
'multivector types incompatible args ' +
560-
str(root_lst) + ' and ' + str(mvtype_lst))
559+
'multivector types incompatible args ' +
560+
str(root_lst) + ' and ' + str(mvtype_lst))
561561

562562
mv_lst = []
563563
for (root, mv_type) in zip(root_lst, mvtype_lst):
@@ -656,10 +656,10 @@ def sm(self, *args, **kwargs):
656656
def parametric(self, coords):
657657
if not isinstance(coords, list):
658658
raise TypeError('In Ga.parametric coords = ' + str(coords) +
659-
' is not a list.')
659+
' is not a list.')
660660
if len(coords) != self.n:
661661
raise ValueError('In Ga.parametric number of parametric functions' +
662-
' not equal to number of coordinates.')
662+
' not equal to number of coordinates.')
663663

664664
self.par_coords = {}
665665

@@ -818,16 +818,16 @@ def _build_bases(self):
818818

819819
if self.debug:
820820
printer.oprint('indexes', self.indexes, 'list(indexes)', self._all_indexes_lst,
821-
'blades', self.blades, 'list(blades)', self._all_blades_lst,
822-
'blades_to_indexes_dict', self.blades_to_indexes_dict,
823-
'indexes_to_blades_dict', self.indexes_to_blades_dict,
824-
'blades_to_grades_dict', self.blades_to_grades_dict,
825-
'blade_super_scripts', self.blade_super_scripts)
821+
'blades', self.blades, 'list(blades)', self._all_blades_lst,
822+
'blades_to_indexes_dict', self.blades_to_indexes_dict,
823+
'indexes_to_blades_dict', self.indexes_to_blades_dict,
824+
'blades_to_grades_dict', self.blades_to_grades_dict,
825+
'blade_super_scripts', self.blade_super_scripts)
826826
if not self.is_ortho:
827827
printer.oprint('bases', self.bases, 'list(bases)', self._all_bases_lst,
828-
'bases_to_indexes_dict', self.bases_to_indexes_dict,
829-
'indexes_to_bases_dict', self.indexes_to_bases_dict,
830-
'bases_to_grades_dict', self.bases_to_grades_dict)
828+
'bases_to_indexes_dict', self.bases_to_indexes_dict,
829+
'indexes_to_bases_dict', self.indexes_to_bases_dict,
830+
'bases_to_grades_dict', self.bases_to_grades_dict)
831831

832832
# create the Mv wrappers
833833
self._all_mv_blades_lst = [
@@ -2033,7 +2033,7 @@ def __init__(self, *args, **kwargs):
20332033

20342034
if len(u) != n_base:
20352035
raise ValueError('In submanifold dimension of base manifold' +
2036-
' not equal to dimension of mapping.')
2036+
' not equal to dimension of mapping.')
20372037
dxdu = []
20382038
for x_i in u:
20392039
tmp = []

galgebra/lt.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def Symbolic_Matrix(root,coords=None,mode='g',f=False,sub=True):
4343
if not f:
4444
mat[row,col] = Symbol(element,real=True)
4545
else:
46-
mat[row,col] = Function(element)(*coords)
46+
mat[row,col] = Function(element)(*coords)
4747

4848
elif mode == 's': # Symmetric symbolic matrix
4949
for row in n_range:
@@ -57,7 +57,7 @@ def Symbolic_Matrix(root,coords=None,mode='g',f=False,sub=True):
5757
if not f:
5858
mat[row,col] = Symbol(element,real=True)
5959
else:
60-
mat[row,col] = Function(element)(*coords)
60+
mat[row,col] = Function(element)(*coords)
6161

6262
elif mode == 'a': # Asymmetric symbolic matrix
6363
for row in n_range:
@@ -75,7 +75,7 @@ def Symbolic_Matrix(root,coords=None,mode='g',f=False,sub=True):
7575
if not f:
7676
mat[row,col] = sign * Symbol(element,real=True)
7777
else:
78-
mat[row,col] = sign * Function(element)(*coords)
78+
mat[row,col] = sign * Function(element)(*coords)
7979
else:
8080
raise ValueError('In Symbolic_Matrix mode = ' + str(mode))
8181
else:
@@ -219,8 +219,8 @@ def __init__(self, *args, **kwargs):
219219
raise ValueError('In Spinor input for Lt, S*S.rev() not a scalar!\n')
220220

221221
elif utils.isstr(mat_rep): # String input
222-
Amat = Symbolic_Matrix(mat_rep, coords=self.Ga.coords,mode=self.mode,f=self.fct_flg)
223-
self.__init__(Amat, ga=self.Ga)
222+
Amat = Symbolic_Matrix(mat_rep, coords=self.Ga.coords,mode=self.mode,f=self.fct_flg)
223+
self.__init__(Amat, ga=self.Ga)
224224

225225
else: # Linear multivector function input
226226
# F is a multivector function to be tested for linearity
@@ -239,7 +239,7 @@ def __init__(self, *args, **kwargs):
239239
def __call__(self, v, obj=False):
240240

241241
if isinstance(v, mv.Mv) and self.Ga.name != v.Ga.name:
242-
raise ValueError('In Lt call Lt and argument refer to different vector spaces')
242+
raise ValueError('In Lt call Lt and argument refer to different vector spaces')
243243

244244
if self.spinor:
245245
if not isinstance(v, mv.Mv):

galgebra/metric.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,8 +419,8 @@ def _build_derivatives_of_basis(self): # Derivatives of basis vectors from Chri
419419
# \frac{\partial e_{j}}{\partial x^{i}} = \Gamma_{ijk} e^{k}
420420
de = [[
421421
sum([Gamma_ijk * e__k for (Gamma_ijk, e__k) in zip(dG[i][j], self.r_symbols)])
422-
for j in n_range]
423-
for i in n_range]
422+
for j in n_range
423+
] for i in n_range]
424424

425425
if self.debug:
426426
printer.oprint('D_{i}e^{j}', de)

galgebra/mv.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1025,8 +1025,8 @@ def rev(self):
10251025
def diff(self, coord):
10261026
Dself = Mv(ga=self.Ga)
10271027
if self.Ga.coords is None:
1028-
Dself.obj = diff(self.obj, coord)
1029-
return Dself
1028+
Dself.obj = diff(self.obj, coord)
1029+
return Dself
10301030
elif coord not in self.Ga.coords:
10311031
if self.Ga.par_coords is None:
10321032
Dself.obj = diff(self.obj, coord)

0 commit comments

Comments
 (0)