Skip to content

Commit

Permalink
Removed unnecessary comments, refs #2354
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Jun 12, 2024
1 parent d118d5c commit 64a125b
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions datasette/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1145,13 +1145,9 @@ def named_parameters(sql: str) -> List[str]:
e.g. for ``select * from foo where id=:id`` this would return ``["id"]``
"""
# Remove single-line comments
sql = _single_line_comment_re.sub("", sql)
# Remove multi-line comments
sql = _multi_line_comment_re.sub("", sql)
# Remove single-quoted strings
sql = _single_quote_re.sub("", sql)
# Remove double-quoted strings
sql = _double_quote_re.sub("", sql)
# Extract parameters from what is left
return _named_param_re.findall(sql)
Expand Down

0 comments on commit 64a125b

Please sign in to comment.