Skip to content

Commit 2bf7b73

Browse files
committed
Eliminated six in package
1 parent 0b9bfe1 commit 2bf7b73

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

querybuilder/tables.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import abc
1+
from abc import ABCMeta
22

33
from django.db.models.base import ModelBase
4-
from six import string_types, with_metaclass
54

65
import querybuilder
76
from querybuilder.fields import FieldFactory
@@ -31,7 +30,7 @@ def __new__(cls, table, *args, **kwargs):
3130
kwargs.update(alias=list(table.keys())[0])
3231
table = list(table.values())[0]
3332
table_type = type(table)
34-
if isinstance(table, string_types):
33+
if isinstance(table, str):
3534
return SimpleTable(table, **kwargs)
3635
elif issubclass(table_type, ModelBase):
3736
return ModelTable(table, **kwargs)
@@ -44,7 +43,7 @@ def __new__(cls, table, *args, **kwargs):
4443
return None
4544

4645

47-
class Table(with_metaclass(abc.ABCMeta, object)):
46+
class Table(object, metaclass=ABCMeta):
4847
"""
4948
Abstract table class that all table types extend.
5049
@@ -259,7 +258,7 @@ def add_fields(self, fields):
259258
or ``Field`` instance
260259
:type fields: str or tuple or list of str or list of Field or :class:`Field <querybuilder.fields.Field>`
261260
"""
262-
if isinstance(fields, string_types):
261+
if isinstance(fields, str):
263262
fields = [fields]
264263
elif type(fields) is tuple:
265264
fields = list(fields)

0 commit comments

Comments
 (0)