Skip to content

Commit d619adc

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 6c17561 commit d619adc

9 files changed

Lines changed: 27 additions & 9 deletions

File tree

deepmd/dpmodel/utils/neighbor_stat.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# SPDX-License-Identifier: LGPL-3.0-or-later
2+
from collections.abc import (
3+
Iterator,
4+
)
25
from typing import (
36
Optional,
47
Tuple,
58
)
6-
from collections.abc import Iterator
79

810
import numpy as np
911

deepmd/pt/utils/env_mat_stat.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
# SPDX-License-Identifier: LGPL-3.0-or-later
2+
from collections.abc import (
3+
Iterator,
4+
)
25
from typing import (
36
TYPE_CHECKING,
47
Dict,
58
List,
69
Tuple,
710
Union,
811
)
9-
from collections.abc import Iterator
1012

1113
import numpy as np
1214
import torch

deepmd/pt/utils/neighbor_stat.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# SPDX-License-Identifier: LGPL-3.0-or-later
2+
from collections.abc import (
3+
Iterator,
4+
)
25
from typing import (
36
Optional,
47
Tuple,
58
)
6-
from collections.abc import Iterator
79

810
import numpy as np
911
import torch

deepmd/tf/entrypoints/transfer.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@
33

44
import logging
55
import re
6+
from collections.abc import (
7+
Sequence,
8+
)
69
from typing import (
710
Dict,
811
Optional,
912
)
10-
from collections.abc import Sequence
1113

1214
import numpy as np
1315

deepmd/tf/utils/neighbor_stat.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
# SPDX-License-Identifier: LGPL-3.0-or-later
22
import logging
3+
from collections.abc import (
4+
Iterator,
5+
)
36
from typing import (
47
Optional,
58
Tuple,
69
)
7-
from collections.abc import Iterator
810

911
import numpy as np
1012

deepmd/tf/utils/parallel_op.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
# SPDX-License-Identifier: LGPL-3.0-or-later
2+
from collections.abc import (
3+
Generator,
4+
)
25
from typing import (
36
Any,
47
Callable,
58
Dict,
69
Optional,
710
Tuple,
811
)
9-
from collections.abc import Generator
1012

1113
from deepmd.tf.env import (
1214
tf,

deepmd/utils/compat.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33

44
import json
55
import warnings
6+
from collections.abc import (
7+
Sequence,
8+
)
69
from pathlib import (
710
Path,
811
)
@@ -12,7 +15,6 @@
1215
Optional,
1316
Union,
1417
)
15-
from collections.abc import Sequence
1618

1719
import numpy as np
1820

deepmd/utils/env_mat_stat.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@
77
from collections import (
88
defaultdict,
99
)
10+
from collections.abc import (
11+
Iterator,
12+
)
1013
from typing import (
1114
Dict,
1215
List,
1316
Optional,
1417
)
15-
from collections.abc import Iterator
1618

1719
import numpy as np
1820

deepmd/utils/neighbor_stat.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@
55
ABC,
66
abstractmethod,
77
)
8+
from collections.abc import (
9+
Iterator,
10+
)
811
from typing import (
912
Tuple,
1013
)
11-
from collections.abc import Iterator
1214

1315
import numpy as np
1416

0 commit comments

Comments
 (0)