Skip to content

Commit

Permalink
Use parens for line continuation
Browse files Browse the repository at this point in the history
  • Loading branch information
kirkedev committed Jul 27, 2019
1 parent c88760a commit ffb0e43
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions mpr/cutout/model.py
Expand Up @@ -27,8 +27,8 @@ def __hash__(self) -> int:
return hash((to_ordinal(self.date), to_ordinal(self.report_date)))

def __eq__(self, other) -> bool:
return isinstance(other, Cutout) and hash(self) == hash(other) and \
np.allclose(self[2:], other[2:], equal_nan=True)
return (isinstance(other, Cutout) and hash(self) == hash(other) and
np.allclose(self[2:], other[2:], equal_nan=True))

@property
def loads(self):
Expand Down
4 changes: 2 additions & 2 deletions mpr/purchase/model.py
Expand Up @@ -27,8 +27,8 @@ def __hash__(self) -> int:
return hash((*map(to_ordinal, self[:2]), *self[2:5]))

def __eq__(self, other) -> bool:
return isinstance(other, Purchase) and hash(self) == hash(other) and \
np.allclose(self[5:], other[5:], equal_nan=True)
return (isinstance(other, Purchase) and hash(self) == hash(other) and
np.allclose(self[5:], other[5:], equal_nan=True))


def to_array(records: Iterator[Purchase]) -> recarray:
Expand Down
4 changes: 2 additions & 2 deletions mpr/slaughter/model.py
Expand Up @@ -35,8 +35,8 @@ def __hash__(self) -> int:
return hash((*map(to_ordinal, self[:2]), self[2:5]))

def __eq__(self, other) -> bool:
return isinstance(other, Slaughter) and hash(self) == hash(other) and \
np.allclose(self[5:], other[5:], equal_nan=True)
return (isinstance(other, Slaughter) and hash(self) == hash(other) and
np.allclose(self[5:], other[5:], equal_nan=True))

@property
def total_weight(self) -> float:
Expand Down

0 comments on commit ffb0e43

Please sign in to comment.