Skip to content

Commit

Permalink
fix: remove unused adql_name function
Browse files Browse the repository at this point in the history
  • Loading branch information
ManonMarchand committed Jan 26, 2024
1 parent 1304824 commit ccf93cb
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
15 changes: 0 additions & 15 deletions astroquery/simbad/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,21 +111,6 @@ def _adql_parameter(entry: str):
return entry.replace("'", "''")


def _adql_name(name: str):
"""Prepare a string to be used as a column or table name.
It prepends and appends a double quote to the elements of the name.
This allows to escape ADQL reserved vocabulary. It then applies the
SIMBAD-specific (not in ADQL) `lowercase` function.
Parameters
----------
name : str
The column name.
"""
return f'''lowercase({'.'.join([f'"{element}"' for element in name.split(".")])})'''


error_regex = re.compile(r'(?ms)\[(?P<line>\d+)\]\s?(?P<msg>.+?)(\[|\Z)')
SimbadError = namedtuple('SimbadError', ('line', 'msg'))
VersionInfo = namedtuple('VersionInfo', ('major', 'minor', 'micro', 'patch'))
Expand Down
4 changes: 0 additions & 4 deletions astroquery/simbad/tests/test_simbad.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,6 @@ def test_adql_parameter():
assert simbad.core._adql_parameter("Barnard's galaxy") == "Barnard''s galaxy"


def test_adql_name():
assert simbad.core._adql_name("biblio.year") == 'lowercase("biblio"."year")'


@pytest.mark.parametrize(('radius', 'expected_radius'),
[('5d0m0s', '5.0d'),
('5d', '5.0d'),
Expand Down

0 comments on commit ccf93cb

Please sign in to comment.