Skip to content

Commit 2cbb476

Browse files
authored
[ci] Fix pre-commit rants, disable deprecated GitHub integration (#8671)
Issue: # ### Brief Summary copilot:summary ### Walkthrough copilot:walkthrough
1 parent 5106074 commit 2cbb476

File tree

8 files changed

+35
-36
lines changed

8 files changed

+35
-36
lines changed

.github/workflows/pull_request.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ jobs:
2222
env:
2323
PR_TITLE: ${{ github.event.pull_request.title }}
2424

25-
- name: PR Project Card Creation
26-
if: github.event.action == 'opened' || github.event.action == 'edited'
27-
run: python misc/ci_create_pr_card.py
28-
env:
29-
GITHUB_TOKEN: ${{ secrets.GARDENER_PAT }}
30-
GH_EVENT: ${{ toJson(github.event) }}
25+
# - name: PR Project Card Creation
26+
# if: github.event.action == 'opened' || github.event.action == 'edited'
27+
# run: python misc/ci_create_pr_card.py
28+
# env:
29+
# GITHUB_TOKEN: ${{ secrets.GARDENER_PAT }}
30+
# GH_EVENT: ${{ toJson(github.event) }}

.pylintrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
disable=all
33
enable=
44
C0121,C0200,C0209,C0321,C0325,C0415,
5-
W0101,W0108,W0202,W0235,W0401,W0404,W0611,W0621,W0622,W612,W1309,
5+
W0101,W0108,W0235,W0401,W0404,W0611,W0621,W0622,W1309,
66
E1101,
7-
R0201,R0205,R0402,R1703,R1705,R1710,R1732
7+
R0205,R0402,R1703,R1705,R1710,R1732

python/taichi/examples/graph/mpm88_graph.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,11 @@ def init_particles(
104104
J[i] = 1
105105

106106

107-
F_x = ti.Vector.ndarray(2, ti.f32, shape=(n_particles))
108-
F_v = ti.Vector.ndarray(2, ti.f32, shape=(n_particles))
107+
F_x = ti.Vector.ndarray(2, ti.f32, shape=n_particles)
108+
F_v = ti.Vector.ndarray(2, ti.f32, shape=n_particles)
109109

110-
F_C = ti.Matrix.ndarray(2, 2, ti.f32, shape=(n_particles))
111-
F_J = ti.ndarray(ti.f32, shape=(n_particles))
110+
F_C = ti.Matrix.ndarray(2, 2, ti.f32, shape=n_particles)
111+
F_J = ti.ndarray(ti.f32, shape=n_particles)
112112
F_grid_v = ti.Vector.ndarray(2, ti.f32, shape=(n_grid, n_grid))
113113
F_grid_m = ti.ndarray(ti.f32, shape=(n_grid, n_grid))
114114

python/taichi/examples/real_func/rendering/taichi_ngp.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -175,25 +175,25 @@ def __init__(self, scale, cascades, grid_size, base_res, log2_T, res, level, exp
175175

176176
# rays intersection parameters
177177
# t1, t2 need to be initialized to -1.0
178-
self.hits_t = ti.Vector.field(n=2, dtype=data_type, shape=(self.N_rays))
178+
self.hits_t = ti.Vector.field(n=2, dtype=data_type, shape=self.N_rays)
179179
self.hits_t.fill(-1.0)
180180
self.center = tf_vec3(0.0, 0.0, 0.0)
181181
self.xyz_min = -tf_vec3(scale, scale, scale)
182182
self.xyz_max = tf_vec3(scale, scale, scale)
183183
self.half_size = (self.xyz_max - self.xyz_min) / 2
184184

185-
self.noise_buffer = ti.Vector.field(2, dtype=data_type, shape=(self.N_rays))
185+
self.noise_buffer = ti.Vector.field(2, dtype=data_type, shape=self.N_rays)
186186
self.gen_noise_buffer()
187187

188-
self.rays_o = ti.Vector.field(n=3, dtype=data_type, shape=(self.N_rays))
189-
self.rays_d = ti.Vector.field(n=3, dtype=data_type, shape=(self.N_rays))
188+
self.rays_o = ti.Vector.field(n=3, dtype=data_type, shape=self.N_rays)
189+
self.rays_d = ti.Vector.field(n=3, dtype=data_type, shape=self.N_rays)
190190

191191
# use the pre-compute direction and scene pose
192192
self.directions = ti.Matrix.field(n=1, m=3, dtype=data_type, shape=(self.N_rays,))
193193
self.pose = ti.Matrix.field(n=3, m=4, dtype=data_type, shape=())
194194

195195
# density_bitfield is used for point sampling
196-
self.density_bitfield = ti.field(ti.uint32, shape=(cascades * grid_size**3 // 32))
196+
self.density_bitfield = ti.field(ti.uint32, shape=cascades * grid_size**3 // 32)
197197

198198
# count the number of rays that still alive
199199
self.counter = ti.field(ti.i32, shape=())
@@ -252,7 +252,7 @@ def __init__(self, scale, cascades, grid_size, base_res, log2_T, res, level, exp
252252

253253
# results buffers
254254
self.opacity = ti.field(ti.f32, shape=(self.N_rays,))
255-
self.depth = ti.field(ti.f32, shape=(self.N_rays))
255+
self.depth = ti.field(ti.f32, shape=self.N_rays)
256256
self.rgb = ti.Vector.field(3, dtype=ti.f32, shape=(self.N_rays,))
257257

258258
# GUI render buffer (data type must be float32)

python/taichi/examples/rendering/taichi_ngp.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -175,25 +175,25 @@ def __init__(self, scale, cascades, grid_size, base_res, log2_T, res, level, exp
175175

176176
# rays intersection parameters
177177
# t1, t2 need to be initialized to -1.0
178-
self.hits_t = ti.Vector.field(n=2, dtype=data_type, shape=(self.N_rays))
178+
self.hits_t = ti.Vector.field(n=2, dtype=data_type, shape=self.N_rays)
179179
self.hits_t.fill(-1.0)
180180
self.center = tf_vec3(0.0, 0.0, 0.0)
181181
self.xyz_min = -tf_vec3(scale, scale, scale)
182182
self.xyz_max = tf_vec3(scale, scale, scale)
183183
self.half_size = (self.xyz_max - self.xyz_min) / 2
184184

185-
self.noise_buffer = ti.Vector.field(2, dtype=data_type, shape=(self.N_rays))
185+
self.noise_buffer = ti.Vector.field(2, dtype=data_type, shape=self.N_rays)
186186
self.gen_noise_buffer()
187187

188-
self.rays_o = ti.Vector.field(n=3, dtype=data_type, shape=(self.N_rays))
189-
self.rays_d = ti.Vector.field(n=3, dtype=data_type, shape=(self.N_rays))
188+
self.rays_o = ti.Vector.field(n=3, dtype=data_type, shape=self.N_rays)
189+
self.rays_d = ti.Vector.field(n=3, dtype=data_type, shape=self.N_rays)
190190

191191
# use the pre-compute direction and scene pose
192192
self.directions = ti.Matrix.field(n=1, m=3, dtype=data_type, shape=(self.N_rays,))
193193
self.pose = ti.Matrix.field(n=3, m=4, dtype=data_type, shape=())
194194

195195
# density_bitfield is used for point sampling
196-
self.density_bitfield = ti.field(ti.uint32, shape=(cascades * grid_size**3 // 32))
196+
self.density_bitfield = ti.field(ti.uint32, shape=cascades * grid_size**3 // 32)
197197

198198
# count the number of rays that still alive
199199
self.counter = ti.field(ti.i32, shape=())
@@ -252,7 +252,7 @@ def __init__(self, scale, cascades, grid_size, base_res, log2_T, res, level, exp
252252

253253
# results buffers
254254
self.opacity = ti.field(ti.f32, shape=(self.N_rays,))
255-
self.depth = ti.field(ti.f32, shape=(self.N_rays))
255+
self.depth = ti.field(ti.f32, shape=self.N_rays)
256256
self.rgb = ti.Vector.field(3, dtype=ti.f32, shape=(self.N_rays,))
257257

258258
# GUI render buffer (data type must be float32)

python/taichi/examples/simulation/eulerfluid2d.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,16 @@ def swap(self):
6363
self.cur, self.nxt = self.nxt, self.cur
6464

6565

66-
velocityField = ti.Vector.field(2, float, shape=(eulerSimParam["shape"]))
67-
_new_velocityField = ti.Vector.field(2, float, shape=(eulerSimParam["shape"]))
68-
colorField = ti.Vector.field(3, float, shape=(eulerSimParam["shape"]))
69-
_new_colorField = ti.Vector.field(3, float, shape=(eulerSimParam["shape"]))
66+
velocityField = ti.Vector.field(2, float, shape=eulerSimParam["shape"])
67+
_new_velocityField = ti.Vector.field(2, float, shape=eulerSimParam["shape"])
68+
colorField = ti.Vector.field(3, float, shape=eulerSimParam["shape"])
69+
_new_colorField = ti.Vector.field(3, float, shape=eulerSimParam["shape"])
7070

71-
curlField = ti.field(float, shape=(eulerSimParam["shape"]))
71+
curlField = ti.field(float, shape=eulerSimParam["shape"])
7272

73-
divField = ti.field(float, shape=(eulerSimParam["shape"]))
74-
pressField = ti.field(float, shape=(eulerSimParam["shape"]))
75-
_new_pressField = ti.field(float, shape=(eulerSimParam["shape"]))
73+
divField = ti.field(float, shape=eulerSimParam["shape"])
74+
pressField = ti.field(float, shape=eulerSimParam["shape"])
75+
_new_pressField = ti.field(float, shape=eulerSimParam["shape"])
7676

7777
velocities_pair = TexPair(velocityField, _new_velocityField)
7878
pressure_pair = TexPair(pressField, _new_pressField)
@@ -96,7 +96,7 @@ def advection(vf: ti.template(), qf: ti.template(), new_qf: ti.template()):
9696
coord_cur = ti.Vector([i, j]) + ti.Vector([0.5, 0.5])
9797
vel_cur = vf[i, j]
9898
coord_prev = coord_cur - vel_cur * eulerSimParam["dt"]
99-
q_prev = bilerp(qf, coord_prev[0], coord_prev[1], (eulerSimParam["shape"]))
99+
q_prev = bilerp(qf, coord_prev[0], coord_prev[1], eulerSimParam["shape"])
100100
new_qf[i, j] = q_prev
101101

102102

python/taichi/examples/simulation/snow_phaseField.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ def __init__(
4646
self.temperature_equi = 1.0 # temperature of equilibrium state
4747

4848
### parameters for RK4 method
49-
self.dtRatio_rk4 = ti.field(ti.f64, shape=(4))
49+
self.dtRatio_rk4 = ti.field(ti.f64, shape=4)
5050
self.dtRatio_rk4.from_numpy(np.array([0.0, 0.5, 0.5, 1.0]))
51-
self.weights_rk4 = ti.field(ti.f64, shape=(4))
51+
self.weights_rk4 = ti.field(ti.f64, shape=4)
5252
self.weights_rk4.from_numpy(np.array([1.0 / 6.0, 1.0 / 3.0, 1.0 / 3.0, 1.0 / 6.0]))
5353

5454
self.showFrameFrequency = int(4 * 1.0e-4 / self.dt)

python/taichi/lang/common_ops.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,6 @@ def _assign(self, other):
264264
:class:`~taichi.lang.expr.Expr`: The expression after assigning."""
265265
return ops.assign(self, other)
266266

267-
# pylint: disable=R0201
268267
def _augassign(self, x, op):
269268
"""Generate the computing expression between self and the given operand of given operator and assigned to self.
270269

0 commit comments

Comments
 (0)