From 2723f1cd723c5889dd6ce501e7234416aba34d9d Mon Sep 17 00:00:00 2001 From: Matthew Horton Date: Fri, 2 Sep 2022 12:50:14 -0700 Subject: [PATCH 1/4] Add `__future__` import for annotations like `list` --- pymatgen/core/tests/test_trajectory.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pymatgen/core/tests/test_trajectory.py b/pymatgen/core/tests/test_trajectory.py index 04da80c88bd..ddb21f67060 100644 --- a/pymatgen/core/tests/test_trajectory.py +++ b/pymatgen/core/tests/test_trajectory.py @@ -1,5 +1,6 @@ import copy import os +from __future__ import annotations import numpy as np From a77d4445e8fa9acab8617ed2bea3c85bee445359 Mon Sep 17 00:00:00 2001 From: Matthew Horton Date: Fri, 2 Sep 2022 12:51:13 -0700 Subject: [PATCH 2/4] Try 3.9, 3.10 test matrix Provided future imports are included, tests should still pass on 3.9, and will be important to ensure users do not encounter runtime errors. --- .github/workflows/test-linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml index 1b4a046fa9b..568ac65d9f1 100644 --- a/.github/workflows/test-linux.yml +++ b/.github/workflows/test-linux.yml @@ -15,7 +15,7 @@ jobs: strategy: max-parallel: 20 matrix: - python-version: ['3.10'] + python-version: ['3.9', '3.10'] # This distribution of tests is designed to ensure an approximately even time to finish for parallel jobs. include: - pkg: pymatgen/analysis/chemenv pymatgen/analysis/elasticity pymatgen/analysis/magnetism From ac7b9087fbeb8302b53c15e27186fba11df04d04 Mon Sep 17 00:00:00 2001 From: Matthew Horton Date: Fri, 2 Sep 2022 12:56:56 -0700 Subject: [PATCH 3/4] Move future import to top of file --- pymatgen/core/tests/test_trajectory.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pymatgen/core/tests/test_trajectory.py b/pymatgen/core/tests/test_trajectory.py index ddb21f67060..3b9553b765b 100644 --- a/pymatgen/core/tests/test_trajectory.py +++ b/pymatgen/core/tests/test_trajectory.py @@ -1,6 +1,6 @@ +from __future__ import annotations import copy import os -from __future__ import annotations import numpy as np From 856738e368089b781a3663846efc25d85e7b99cc Mon Sep 17 00:00:00 2001 From: Matthew Horton Date: Fri, 2 Sep 2022 13:01:12 -0700 Subject: [PATCH 4/4] isort --- pymatgen/core/tests/test_trajectory.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pymatgen/core/tests/test_trajectory.py b/pymatgen/core/tests/test_trajectory.py index 3b9553b765b..7b82af03639 100644 --- a/pymatgen/core/tests/test_trajectory.py +++ b/pymatgen/core/tests/test_trajectory.py @@ -1,4 +1,5 @@ from __future__ import annotations + import copy import os