Skip to content

Commit

Permalink
Fix pre-commit and add CHANGES
Browse files Browse the repository at this point in the history
Clean up PR for submission.
  • Loading branch information
MichaelTiemannOSC committed Jul 19, 2024
1 parent 32c9d64 commit b53bcf0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pint-pandas Changelog
0.7 (unreleased)
--------------------

- Nothing added yet.
- Fix PintType._get_common_dtype (added via #137) to check compatibility of all `PintType`s in `dtypes`


0.6.1 (2024-07-13)
Expand Down
5 changes: 4 additions & 1 deletion pint_pandas/pint_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,10 @@ def _get_common_dtype(self, dtypes):
PintType_list = [x for x in dtypes if isinstance(x, PintType)]
if len(PintType_list) < 2:
return self
if all (PintType_list[0].units.is_compatible_with(x.units) for x in PintType_list[1:]):
if all(
PintType_list[0].units.is_compatible_with(x.units)
for x in PintType_list[1:]
):
return self
else:
return None
Expand Down

0 comments on commit b53bcf0

Please sign in to comment.