Skip to content

Commit 7b44826

Browse files
Copilotanyangml
andcommitted
Addressing PR comments
Co-authored-by: anyangml <137014849+anyangml@users.noreply.github.com>
1 parent e756d3a commit 7b44826

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

deepmd/utils/data_system.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# SPDX-License-Identifier: LGPL-3.0-or-later
22
import collections
3+
import itertools
34
import logging
45
import os
56
import warnings
@@ -864,7 +865,11 @@ def process_systems(
864865
systems = rglob_sys_str(systems, patterns)
865866
elif isinstance(systems, list):
866867
# Process each system individually and flatten results
867-
systems = sum([_process_single_system(system) for system in systems], [])
868+
systems = list(
869+
itertools.chain.from_iterable(
870+
_process_single_system(system) for system in systems
871+
)
872+
)
868873
return systems
869874

870875

0 commit comments

Comments
 (0)