Skip to content

Commit

Permalink
Fixed a type hint compatibility issue in Python 3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurentRDC committed Jun 19, 2022
1 parent 4d8d01c commit 98d2e54
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crystals/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from functools import reduce
from itertools import chain
from math import gcd
from typing import Any, Callable, Iterable, Iterator, Optional, Union
from typing import Any, Callable, Dict, Iterable, Iterator, Optional, Union

from numpy.typing import ArrayLike
import numpy as np
Expand Down Expand Up @@ -161,7 +161,7 @@ def satisfying(self, predicate: Callable[[Atom], bool]) -> "AtomicStructure":
return AtomicStructure(atoms=filter(predicate, iter(self)))

@property
def chemical_composition(self) -> OrderedDict[str, float]:
def chemical_composition(self) -> Dict[str, float]:
"""
Chemical composition of this structure as an ordered dictionary. Keys are elemental symbols.
Elements are in descending order of prevalence.
Expand Down

0 comments on commit 98d2e54

Please sign in to comment.