Skip to content

Commit

Permalink
MAINT: addressing np 2.0 repr changes
Browse files Browse the repository at this point in the history
  • Loading branch information
bsipocz committed Nov 25, 2024
1 parent 2c71ad5 commit eba8c6f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
5 changes: 0 additions & 5 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@
iers_conf.auto_download = False


# Keep this until we require numpy to be >=2.0
if minversion(np, "2.0.0.dev0+git20230726"):
np.set_printoptions(legacy="1.25")


def pytest_configure(config):
"""Configure Pytest with Astropy.
Expand Down
2 changes: 1 addition & 1 deletion pyvo/dal/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ def __len__(self):
return len(self._mapping)

def __repr__(self):
return repr(tuple(self.values()))
return repr(tuple(f'{val}' for val in self.values()))

def get(self, key, default=None, decode=False):
"""
Expand Down
2 changes: 1 addition & 1 deletion pyvo/dal/tests/test_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ def test_repr(self):
record = DALResults.from_result_url(
'http://example.com/query/basic')[0]
truth = 'Illuminatus'
assert repr(record) == repr((23, truth))
assert repr(record) == repr(('23', truth))

def test_get(self):
record = DALResults.from_result_url(
Expand Down

0 comments on commit eba8c6f

Please sign in to comment.