From 130482440b65e921df73a98f31e90cdb33e06da2 Mon Sep 17 00:00:00 2001 From: MARCHAND MANON Date: Fri, 26 Jan 2024 14:16:20 +0100 Subject: [PATCH] fix: simplify IN statement --- astroquery/simbad/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/astroquery/simbad/core.py b/astroquery/simbad/core.py index 042712d459..6d310187c8 100644 --- a/astroquery/simbad/core.py +++ b/astroquery/simbad/core.py @@ -1097,7 +1097,7 @@ def list_columns(self, *tables: str, keyword=None, get_adql=False): if len(tables) == 1: query += f" AND table_name = '{tables[0]}'" elif len(tables) > 1: - query += f" AND table_name IN ({str(tables)[1:-1]})" + query += f" AND table_name IN {tables}" # add the keyword condition if keyword is not None: condition = f"LIKE LOWERCASE('%{_adql_parameter(keyword)}%')"