Skip to content

Commit 4f0d6b3

Browse files
Merge pull request #230 from vincentcasseau/main
Github Actions: autopep8 formatter - adding more error codes to match that of Fast
2 parents 5bdafa9 + 768a43c commit 4f0d6b3

File tree

1,049 files changed

+9221
-9641
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,049 files changed

+9221
-9641
lines changed

.github/workflows/autopep8_formatter.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,9 @@ jobs:
2727
- name: Run autopep8
2828
run: |
2929
pythonFiles=`find Cassiopee/ -type f -not -path "*/build/*" -not -path "*/ThirdParty/*" -name "*.py" -not -name "Internal.py"`
30-
autopep8 --in-place --indent-size=4 --select=E101 \
31-
$pythonFiles
32-
autopep8 --in-place --indent-size=2 --select=E101 \
33-
Cassiopee/Converter/Converter/Internal.py
30+
errorCodes="E101,E11,E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E133,E251,E252,E711,E713,E714,E721,E722,W291,W293,W391"
31+
autopep8 --in-place --indent-size=4 --select=$errorCodes $pythonFiles
32+
autopep8 --in-place --indent-size=2 --select=$errorCodes Cassiopee/Converter/Converter/Internal.py
3433
3534
- name: Commit changes
3635
run: |

Cassiopee/Apps/Apps/App.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# General class of Cassiopee App
2-
# Data oriented
2+
# Data oriented
33
# One method: run
44

55
__version__ = '3.1'

Cassiopee/Apps/Apps/Chimera/Chimera.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import Converter.PyTree as C
2-
import Converter.Internal as Internal
2+
import Converter.Internal as Internal
33
import Post.PyTree as P
44
import Transform.PyTree as T
55
import Converter.Filter as Filter
@@ -9,7 +9,7 @@
99
import Geom.PyTree as D
1010

1111
IMETHOD = 'AABB'
12-
# Extraction de la solution sur une surface dans le plan (X,R) a partir d un maillage recouvrant
12+
# Extraction de la solution sur une surface dans le plan (X,R) a partir d un maillage recouvrant
1313
# et d une courbe ou un nuage de points definis dans le plan(X,R)
1414
# t_sol et t_pts sont dans le systeme de coordonnees cartesiennes
1515
# t_sol et t_pts sont des fichiers
@@ -31,7 +31,7 @@ def extractSurface(t_sol, t_pts=None, eq=(0.,0.,0.,0.), XC=(0.,0.,0.), AXIS=(1.,
3131
C.convertPyTree2File(PtsXR,"Pts_XR.cgns")
3232
DTheta=C.getMaxValue(PtsXR,"CoordinateZ")-C.getMinValue(PtsXR,"CoordinateZ")
3333

34-
if isinstance(t_sol,str):
34+
if isinstance(t_sol,str):
3535
h = Filter.Handle(t_sol)
3636
t = h.loadSkeleton()
3737
h._loadZonesWoVars(t)
@@ -79,10 +79,10 @@ def extractSurface(t_sol, t_pts=None, eq=(0.,0.,0.,0.), XC=(0.,0.,0.), AXIS=(1.,
7979
# resBB = G.BB(res,method=IMETHOD)
8080
res = XOR.conformUnstr(res,tol=0.,itermax=1)
8181

82-
if isinstance(t_sol,str):
82+
if isinstance(t_sol,str):
8383
if len(variables)==0:# on interpole tout
8484
t = C.convertFile2PyTree(t_sol)
85-
else:
85+
else:
8686
h = Filter.Handle(t_sol)
8787
t = h.loadSkeleton()
8888
h._loadZonesWoVars(t)
@@ -97,22 +97,22 @@ def extractSurface(t_sol, t_pts=None, eq=(0.,0.,0.,0.), XC=(0.,0.,0.), AXIS=(1.,
9797
if G.bboxIntersection(resBB,zbbd,method=IMETHOD,isBB=True)==1:
9898
zd = Internal.getNodeFromName(t,zbbd[0])
9999
dnrZones.append(zd)
100-
P._extractMesh(dnrZones,res,order=2,constraint=10.,mode=mode)
100+
P._extractMesh(dnrZones,res,order=2,constraint=10.,mode=mode)
101101
C._rmVars(res,[cellNName])
102102
return res
103103

104104
def extractIJSurface(t_sol, t_pts, XC=(0.,0.,0.), AXIS=(1.,0.,0.), loc='centers', cellNName='cellN',variables=[]):
105105
# distrib en i (le long de la ligne) et j
106106
NI = 101; NJ = 201
107107
dhi = G.cart((0.,0.,0.),(1./(NI-1),1,1),(NI,1,1))
108-
# on peut mettre un resserrement :
108+
# on peut mettre un resserrement :
109109
# dhi = G.enforcePlusX(dhi, ...
110110
dhj = G.cart((0.,0.,0.),(1./(NJ-1),1,1),(NJ,1,1))
111111

112112
if loc == 'centers': cellNName2 = 'centers:'+cellNName
113113
else: cellNName2 = cellNName
114114

115-
if isinstance(t_sol,str):
115+
if isinstance(t_sol,str):
116116
h = Filter.Handle(t_sol)
117117
t = h.loadSkeleton()
118118
h._loadZonesWoVars(t)

Cassiopee/Apps/Apps/Chimera/ExtractDoublyDefined.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def _extrapOnBCDataSet(t, variables):
2626

2727
for var in variables:
2828
v = var.split(':',1)
29-
if len(v) == 2:
29+
if len(v) == 2:
3030
if v[0] == 'centers' or v[0] == 'nodes': v = v[1]
3131
else: v = var
3232
else: v = var
-1
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-

0 commit comments

Comments
 (0)