Skip to content

Commit

Permalink
fix: remove six dependency (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
dpgaspar committed Feb 14, 2022
1 parent 742f590 commit 0d5a930
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions es/baseapi.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
from collections import namedtuple
from typing import Any, Dict, List, Optional, Tuple
from urllib import parse

from elasticsearch import Elasticsearch
from elasticsearch import exceptions as es_exceptions
from es import exceptions
from six import string_types
from six.moves.urllib import parse


from .const import DEFAULT_FETCH_SIZE, DEFAULT_SCHEMA, DEFAULT_SQL_PATH
Expand Down Expand Up @@ -344,7 +343,7 @@ def apply_parameters(operation: str, parameters: Optional[Dict[str, Any]]) -> st
def escape(value):
if value == "*":
return value
elif isinstance(value, string_types):
elif isinstance(value, str):
return "'{}'".format(value.replace("'", "''"))
elif isinstance(value, bool):
return "TRUE" if value else "FALSE"
Expand Down

0 comments on commit 0d5a930

Please sign in to comment.