Skip to content

Commit

Permalink
Fix astropy pformat_all deprecation
Browse files Browse the repository at this point in the history
Astropy's Table.pformat_all() is now deprecated -- Table.pformat() is an exact replacement.
  • Loading branch information
dhirving committed Feb 26, 2025
1 parent bd9e73f commit 76be482
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion python/lsst/daf/butler/cli/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def astropyTablesToStr(tables: list[Table]) -> str:
ret = ""
for table in tables:
ret += "\n"
table.pformat_all()
table.pformat()
ret += "\n"
return ret

Expand Down
4 changes: 2 additions & 2 deletions python/lsst/daf/butler/tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@ def assertAstropyTablesEqual(
# Assert that they match.
# Recommendation from Astropy Slack is to format the table into
# lines for comparison. We do not compare column data types.
table1 = table.pformat_all()
expected1 = expected.pformat_all()
table1 = table.pformat()
expected1 = expected.pformat()
original_max = self.maxDiff
self.maxDiff = None # This is required to get the full diff.
try:
Expand Down

0 comments on commit 76be482

Please sign in to comment.