diff --git a/pymatgen/db/__init__.py b/pymatgen/db/__init__.py index 22668f7..2470563 100644 --- a/pymatgen/db/__init__.py +++ b/pymatgen/db/__init__.py @@ -6,6 +6,7 @@ is also provided to enable the easy translation of MongoDB docs to useful pymatgen objects for analysis purposes. """ + from __future__ import annotations import os diff --git a/pymatgen/db/alchemy/tests/test_transmuters.py b/pymatgen/db/alchemy/tests/test_transmuters.py index 01a0110..5fcd26b 100644 --- a/pymatgen/db/alchemy/tests/test_transmuters.py +++ b/pymatgen/db/alchemy/tests/test_transmuters.py @@ -1,6 +1,7 @@ """ Created on Mar 5, 2012 """ + from __future__ import annotations __author__ = "Shyue Ping Ong" diff --git a/pymatgen/db/alchemy/transmuters.py b/pymatgen/db/alchemy/transmuters.py index 51e37e1..e2913c9 100644 --- a/pymatgen/db/alchemy/transmuters.py +++ b/pymatgen/db/alchemy/transmuters.py @@ -3,6 +3,7 @@ TransformedStructures from DB data sources. They enable the high-throughput generation of new structures and input files. """ + from __future__ import annotations __author__ = "Shyue Ping Ong" diff --git a/pymatgen/db/config.py b/pymatgen/db/config.py index 57b1357..cd1b20d 100644 --- a/pymatgen/db/config.py +++ b/pymatgen/db/config.py @@ -9,6 +9,7 @@ # access dict of parsed conf. settings settings = cfg1.settings. """ + from __future__ import annotations import os diff --git a/pymatgen/db/creator.py b/pymatgen/db/creator.py index d1c5d50..c744a7e 100644 --- a/pymatgen/db/creator.py +++ b/pymatgen/db/creator.py @@ -2,6 +2,7 @@ This module defines a Drone to assimilate vasp data and insert it into a Mongo database. """ + from __future__ import annotations import datetime @@ -320,7 +321,6 @@ def post_process(self, dir_name, d): d["icsd_id"] = int(m.group(1)) except Exception: logger.warning("Cannot parse ICSD from transformations file.") - pass else: logger.warning("Transformations file does not exist.") diff --git a/pymatgen/db/matproj.py b/pymatgen/db/matproj.py index 730ea80..42cf0b8 100644 --- a/pymatgen/db/matproj.py +++ b/pymatgen/db/matproj.py @@ -3,6 +3,7 @@ See https://medium.com/@shyuep/a-local-materials-project-database-1ea909430c95 """ + from __future__ import annotations import itertools diff --git a/pymatgen/db/query_engine.py b/pymatgen/db/query_engine.py index 3e336d8..0cb0530 100644 --- a/pymatgen/db/query_engine.py +++ b/pymatgen/db/query_engine.py @@ -2,6 +2,7 @@ This module provides a QueryEngine that simplifies queries for Mongo databases generated using hive. """ + from __future__ import annotations __author__ = "Shyue Ping Ong, Michael Kocher, Dan Gunter" diff --git a/pymatgen/db/tests/common.py b/pymatgen/db/tests/common.py index f044756..ba2c8f7 100644 --- a/pymatgen/db/tests/common.py +++ b/pymatgen/db/tests/common.py @@ -1,6 +1,7 @@ """ Common functions for tests """ + from __future__ import annotations __author__ = "Dan Gunter " diff --git a/pymatgen/db/tests/test_creator_and_query_engine.py b/pymatgen/db/tests/test_creator_and_query_engine.py index 3a1d9bd..79f2d2f 100644 --- a/pymatgen/db/tests/test_creator_and_query_engine.py +++ b/pymatgen/db/tests/test_creator_and_query_engine.py @@ -1,6 +1,7 @@ """ Created on Jun 19, 2012 """ + from __future__ import annotations import os diff --git a/pymatgen/db/util.py b/pymatgen/db/util.py index e145523..ebd23d4 100644 --- a/pymatgen/db/util.py +++ b/pymatgen/db/util.py @@ -1,4 +1,5 @@ """Utility functions used across scripts.""" + from __future__ import annotations import datetime