Skip to content

Commit

Permalink
Ignoring pymatgen type hints until setuptools is fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
bjmorgan committed Nov 9, 2023
1 parent b6987e1 commit 9b447d4
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 8 deletions.
2 changes: 1 addition & 1 deletion vasppy/neighbour_list.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import annotations

from pymatgen.core import Structure
from pymatgen.core import Structure # type:ignore
from vasppy.utils import dr_ij
from typing import Type
import numpy as np
Expand Down
4 changes: 2 additions & 2 deletions vasppy/poscar.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import copy
from vasppy import cell
from vasppy.units import angstrom_to_bohr
from pymatgen.core import Lattice as pmg_Lattice
from pymatgen.core import Structure as pmg_Structure
from pymatgen.core import Lattice as pmg_Lattice # type:ignore
from pymatgen.core import Structure as pmg_Structure # type:ignore
from pymatgen.io.cif import CifWriter # type: ignore
from collections import Counter

Expand Down
2 changes: 1 addition & 1 deletion vasppy/rdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from typing import Optional, Type
import numpy as np
from scipy.ndimage import gaussian_filter1d # type: ignore
from pymatgen.core import Structure
from pymatgen.core import Structure # type: ignore
from vasppy.utils import dr_ij


Expand Down
4 changes: 2 additions & 2 deletions vasppy/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
from pathlib import Path
import os
from contextlib import contextmanager
from pymatgen.core import Structure
from typing import Optional, List
from pymatgen.core import Structure # type: ignore
from typing import Optional, List # type: ignore
import numpy as np


Expand Down
2 changes: 1 addition & 1 deletion vasppy/vasprun.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from lxml import etree # type: ignore
from typing import List, Union, Optional, Any, Dict
from pymatgen.core import Structure
from pymatgen.core import Structure # type: ignore
import numpy as np


Expand Down
13 changes: 12 additions & 1 deletion vasppy/xdatcar.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@


class Xdatcar:
"""Class for parsing and working with VASP XDATCAR files."""

lines_offset = 9

def __init__(self):
Expand All @@ -20,7 +22,16 @@ def __init__(self):
self.poscar = []
self.poscar.append(Poscar())

def read_from(self, filename):
def read_from(self, filename: str) -> None:
"""Read XDATCAR data from a VASP XDATCAR file.
Args:
filename (str): The XDATCAR file to read.
Returns:
None
"""
self.poscar[0].read_from(filename)
with open(filename) as f:
lines = f.read()
Expand Down

0 comments on commit 9b447d4

Please sign in to comment.