Skip to content

Commit

Permalink
use 3.7 compliant lru_cache
Browse files Browse the repository at this point in the history
  • Loading branch information
shyamd committed May 21, 2021
1 parent dcab926 commit 1e301d3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions emmet-core/emmet/core/feff/task.py
@@ -1,5 +1,5 @@
""" Core definition of a VASP Task Document """
from functools import cached_property
from functools import lru_cache
from typing import Any, ClassVar, Dict, List

from pydantic import Field
Expand Down Expand Up @@ -55,7 +55,8 @@ def absorbing_element(self) -> Element:
return self.structure[self.absorbing_atom].specie
return self.structure[self.absorbing_atom].specie.element

@cached_property
@property
@lru_cache()
def xas_spectrum(self) -> XAS:

if not all([len(p) == 6 for p in self.spectrum]):
Expand Down

0 comments on commit 1e301d3

Please sign in to comment.