From 07ef8d22c123a7666bc5b66354bc82121c796835 Mon Sep 17 00:00:00 2001 From: Friedrich Lindenberg Date: Sun, 28 Jun 2020 21:09:09 +0200 Subject: [PATCH] Remove duplicate function --- dataset/util.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/dataset/util.py b/dataset/util.py index 004c19f..141f467 100644 --- a/dataset/util.py +++ b/dataset/util.py @@ -1,7 +1,6 @@ from hashlib import sha1 from urllib.parse import urlparse from collections import OrderedDict -from collections.abc import Iterable from sqlalchemy.exc import ResourceClosedError QUERY_STEP = 1000 @@ -110,15 +109,6 @@ def index_name(table, columns): return 'ix_%s_%s' % (table, key) -def ensure_tuple(obj): - """Try and make the given argument into a tuple.""" - if obj is None: - return tuple() - if isinstance(obj, Iterable) and not isinstance(obj, (str, bytes)): - return tuple(obj) - return obj, - - def pad_chunk_columns(chunk, columns): """Given a set of items to be inserted, make sure they all have the same columns by padding columns with None if they are missing."""