restored type hints
for some strange reason, ignore is needed for damask.Crystal.__eq__
This commit is contained in:
parent
fbfe2affb7
commit
b332fd2b30
|
@ -547,7 +547,7 @@ class Crystal():
|
||||||
|
|
||||||
|
|
||||||
def __eq__(self,
|
def __eq__(self,
|
||||||
other):
|
other: object) -> bool:
|
||||||
"""
|
"""
|
||||||
Return self==other.
|
Return self==other.
|
||||||
|
|
||||||
|
@ -562,7 +562,7 @@ class Crystal():
|
||||||
return (NotImplemented if not isinstance(other, Crystal) else
|
return (NotImplemented if not isinstance(other, Crystal) else
|
||||||
self.lattice == other.lattice and
|
self.lattice == other.lattice and
|
||||||
self.parameters == other.parameters and
|
self.parameters == other.parameters and
|
||||||
self.family == other.family)
|
self.family == other.family) # type: ignore
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def parameters(self) -> Optional[Tuple]:
|
def parameters(self) -> Optional[Tuple]:
|
||||||
|
|
|
@ -122,7 +122,7 @@ class Orientation(Rotation,Crystal):
|
||||||
|
|
||||||
|
|
||||||
def __eq__(self,
|
def __eq__(self,
|
||||||
other: Union[object,MyType]) -> bool:
|
other: object) -> bool:
|
||||||
"""
|
"""
|
||||||
Return self==other.
|
Return self==other.
|
||||||
|
|
||||||
|
|
|
@ -57,6 +57,11 @@ class Table:
|
||||||
|
|
||||||
Test equality of other.
|
Test equality of other.
|
||||||
|
|
||||||
|
Parameters
|
||||||
|
----------
|
||||||
|
other : Table
|
||||||
|
Table to check for equality.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
return NotImplemented if not isinstance(other,Table) else \
|
return NotImplemented if not isinstance(other,Table) else \
|
||||||
self.shapes == other.shapes and self.data.equals(other.data)
|
self.shapes == other.shapes and self.data.equals(other.data)
|
||||||
|
|
Loading…
Reference in New Issue