Skip to content

Commit e829920

Browse files
committed
test(consistent): mark unused DPA3 case fields\n\nPrefix intentionally unused unpacked variables in the curated DPA3\nconsistent tests so ruff no longer reports RUF059 on the helper\nproperties and setup code.\n\nAuthored by OpenClaw (model: gpt-5.4)
1 parent 48a9d71 commit e829920

1 file changed

Lines changed: 101 additions & 101 deletions

File tree

source/tests/consistent/descriptor/test_dpa3.py

Lines changed: 101 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -241,84 +241,84 @@ def data(self) -> dict:
241241
@property
242242
def skip_pt(self) -> bool:
243243
(
244-
update_residual_init,
245-
exclude_types,
246-
update_angle,
247-
a_compress_rate,
248-
a_compress_e_rate,
249-
a_compress_use_split,
250-
optim_update,
251-
edge_init_use_dist,
252-
use_exp_switch,
253-
use_dynamic_sel,
254-
use_loc_mapping,
255-
fix_stat_std,
256-
n_multi_edge_message,
257-
precision,
258-
add_chg_spin_ebd,
244+
_update_residual_init,
245+
_exclude_types,
246+
_update_angle,
247+
_a_compress_rate,
248+
_a_compress_e_rate,
249+
_a_compress_use_split,
250+
_optim_update,
251+
_edge_init_use_dist,
252+
_use_exp_switch,
253+
_use_dynamic_sel,
254+
_use_loc_mapping,
255+
_fix_stat_std,
256+
_n_multi_edge_message,
257+
_precision,
258+
_add_chg_spin_ebd,
259259
) = self.param
260260
return CommonTest.skip_pt
261261

262262
@property
263263
def skip_pd(self) -> bool:
264264
(
265-
update_residual_init,
266-
exclude_types,
267-
update_angle,
268-
a_compress_rate,
269-
a_compress_e_rate,
270-
a_compress_use_split,
271-
optim_update,
272-
edge_init_use_dist,
273-
use_exp_switch,
274-
use_dynamic_sel,
275-
use_loc_mapping,
276-
fix_stat_std,
277-
n_multi_edge_message,
278-
precision,
265+
_update_residual_init,
266+
_exclude_types,
267+
_update_angle,
268+
_a_compress_rate,
269+
_a_compress_e_rate,
270+
_a_compress_use_split,
271+
_optim_update,
272+
_edge_init_use_dist,
273+
_use_exp_switch,
274+
_use_dynamic_sel,
275+
_use_loc_mapping,
276+
_fix_stat_std,
277+
_n_multi_edge_message,
278+
_precision,
279279
add_chg_spin_ebd,
280280
) = self.param
281281
return True if add_chg_spin_ebd else CommonTest.skip_pd
282282

283283
@property
284284
def skip_dp(self) -> bool:
285285
(
286-
update_residual_init,
287-
exclude_types,
288-
update_angle,
289-
a_compress_rate,
290-
a_compress_e_rate,
291-
a_compress_use_split,
292-
optim_update,
293-
edge_init_use_dist,
294-
use_exp_switch,
295-
use_dynamic_sel,
296-
use_loc_mapping,
297-
fix_stat_std,
298-
n_multi_edge_message,
299-
precision,
300-
add_chg_spin_ebd,
286+
_update_residual_init,
287+
_exclude_types,
288+
_update_angle,
289+
_a_compress_rate,
290+
_a_compress_e_rate,
291+
_a_compress_use_split,
292+
_optim_update,
293+
_edge_init_use_dist,
294+
_use_exp_switch,
295+
_use_dynamic_sel,
296+
_use_loc_mapping,
297+
_fix_stat_std,
298+
_n_multi_edge_message,
299+
_precision,
300+
_add_chg_spin_ebd,
301301
) = self.param
302302
return CommonTest.skip_dp
303303

304304
@property
305305
def skip_tf(self) -> bool:
306306
(
307-
update_residual_init,
308-
exclude_types,
309-
update_angle,
310-
a_compress_rate,
311-
a_compress_e_rate,
312-
a_compress_use_split,
313-
optim_update,
314-
edge_init_use_dist,
315-
use_exp_switch,
316-
use_dynamic_sel,
317-
use_loc_mapping,
318-
fix_stat_std,
319-
n_multi_edge_message,
320-
precision,
321-
add_chg_spin_ebd,
307+
_update_residual_init,
308+
_exclude_types,
309+
_update_angle,
310+
_a_compress_rate,
311+
_a_compress_e_rate,
312+
_a_compress_use_split,
313+
_optim_update,
314+
_edge_init_use_dist,
315+
_use_exp_switch,
316+
_use_dynamic_sel,
317+
_use_loc_mapping,
318+
_fix_stat_std,
319+
_n_multi_edge_message,
320+
_precision,
321+
_add_chg_spin_ebd,
322322
) = self.param
323323
return True
324324

@@ -369,20 +369,20 @@ def setUp(self) -> None:
369369
)
370370
self.natoms = np.array([6, 6, 2, 4], dtype=np.int32)
371371
(
372-
update_residual_init,
373-
exclude_types,
374-
update_angle,
375-
a_compress_rate,
376-
a_compress_e_rate,
377-
a_compress_use_split,
378-
optim_update,
379-
edge_init_use_dist,
380-
use_exp_switch,
381-
use_dynamic_sel,
382-
use_loc_mapping,
383-
fix_stat_std,
384-
n_multi_edge_message,
385-
precision,
372+
_update_residual_init,
373+
_exclude_types,
374+
_update_angle,
375+
_a_compress_rate,
376+
_a_compress_e_rate,
377+
_a_compress_use_split,
378+
_optim_update,
379+
_edge_init_use_dist,
380+
_use_exp_switch,
381+
_use_dynamic_sel,
382+
_use_loc_mapping,
383+
_fix_stat_std,
384+
_n_multi_edge_message,
385+
_precision,
386386
add_chg_spin_ebd,
387387
) = self.param
388388
# fparam for charge=5, spin=1 when add_chg_spin_ebd is True
@@ -475,21 +475,21 @@ def extract_ret(self, ret: Any, backend) -> tuple[np.ndarray, ...]:
475475
def rtol(self) -> float:
476476
"""Relative tolerance for comparing the return value."""
477477
(
478-
update_residual_init,
479-
exclude_types,
480-
update_angle,
481-
a_compress_rate,
482-
a_compress_e_rate,
483-
a_compress_use_split,
484-
optim_update,
485-
edge_init_use_dist,
486-
use_exp_switch,
487-
use_dynamic_sel,
488-
use_loc_mapping,
489-
fix_stat_std,
490-
n_multi_edge_message,
478+
_update_residual_init,
479+
_exclude_types,
480+
_update_angle,
481+
_a_compress_rate,
482+
_a_compress_e_rate,
483+
_a_compress_use_split,
484+
_optim_update,
485+
_edge_init_use_dist,
486+
_use_exp_switch,
487+
_use_dynamic_sel,
488+
_use_loc_mapping,
489+
_fix_stat_std,
490+
_n_multi_edge_message,
491491
precision,
492-
add_chg_spin_ebd,
492+
_add_chg_spin_ebd,
493493
) = self.param
494494
if precision == "float64":
495495
return 1e-10
@@ -502,21 +502,21 @@ def rtol(self) -> float:
502502
def atol(self) -> float:
503503
"""Absolute tolerance for comparing the return value."""
504504
(
505-
update_residual_init,
506-
exclude_types,
507-
update_angle,
508-
a_compress_rate,
509-
a_compress_e_rate,
510-
a_compress_use_split,
511-
optim_update,
512-
edge_init_use_dist,
513-
use_exp_switch,
514-
use_dynamic_sel,
515-
use_loc_mapping,
516-
fix_stat_std,
517-
n_multi_edge_message,
505+
_update_residual_init,
506+
_exclude_types,
507+
_update_angle,
508+
_a_compress_rate,
509+
_a_compress_e_rate,
510+
_a_compress_use_split,
511+
_optim_update,
512+
_edge_init_use_dist,
513+
_use_exp_switch,
514+
_use_dynamic_sel,
515+
_use_loc_mapping,
516+
_fix_stat_std,
517+
_n_multi_edge_message,
518518
precision,
519-
add_chg_spin_ebd,
519+
_add_chg_spin_ebd,
520520
) = self.param
521521
if precision == "float64":
522522
return 1e-6 # need to fix in the future, see issue https://github.com/deepmodeling/deepmd-kit/issues/3786

0 commit comments

Comments
 (0)