Skip to content

Commit

Permalink
no Self (py<3.11)
Browse files Browse the repository at this point in the history
  • Loading branch information
pierre-24 committed Oct 5, 2023
1 parent a82c36e commit 69f3a35
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions just_psf/geometry.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import numpy

from typing import TextIO, Self
from typing import TextIO
from just_psf import logger


Expand All @@ -17,8 +17,8 @@ def __init__(self, symbols: list, positions: numpy.ndarray):
def __len__(self) -> int:
return len(self.symbols)

def copy(self) -> Self:
"""Copy itself. Involves a copy of positions, symbols, and unit cell.
def copy(self) -> 'Geometry':
"""Copy itself. Involves a copy of positions and symbols.
"""

return Geometry(
Expand All @@ -27,7 +27,7 @@ def copy(self) -> Self:
)

@classmethod
def from_xyz(cls, f: TextIO) -> Self:
def from_xyz(cls, f: TextIO) -> 'Geometry':
"""Read geometry from a XYZ file
"""

Expand Down
4 changes: 2 additions & 2 deletions just_psf/topology.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import numpy
from numpy.typing import NDArray

from typing import TextIO, List, Self, Optional
from typing import TextIO, List, Optional


class Topology:
Expand Down Expand Up @@ -59,7 +59,7 @@ def __len__(self) -> int:
return len(self.symbols)

@classmethod
def from_psf(cls, f: TextIO) -> Self:
def from_psf(cls, f: TextIO) -> 'Topology':
"""Read topology from a NAMD PSF file"""

from just_psf.psf_parser import PSFParser
Expand Down

0 comments on commit 69f3a35

Please sign in to comment.