Skip to content
This repository has been archived by the owner on Jul 23, 2022. It is now read-only.

Commit

Permalink
fix style issues
Browse files Browse the repository at this point in the history
  • Loading branch information
sdpython committed Jul 22, 2018
1 parent 9a119f9 commit 6c2404e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
9 changes: 0 additions & 9 deletions src/pysqllike/generic/column_group_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
@brief Creates custom classes to interpret Python expression as column operations.
"""

import collections

from .column_operator import ColumnOperator
from .others_types import NA

Expand Down Expand Up @@ -52,9 +50,6 @@ def __call__(self, columns):
"""
returns the results of this operation between a list of columns
"""
if not isinstance(columns, collections.Iterable):
raise TypeError(
"we expect an iterator here not " + str(type(columns)))
return len(columns)


Expand All @@ -75,10 +70,6 @@ def __call__(self, columns):
returns the results of this operation between a list of columns,
it returns @see cl NA for a null set
"""
if not isinstance(columns, collections.Iterable):
raise TypeError(
"we expect an iterator here not " + str(type(columns)))

# we walk through the set only once
nb = 0
for val in columns:
Expand Down
4 changes: 1 addition & 3 deletions src/pysqllike/generic/column_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
@brief Classes which defines column for class @see cl IterRow
"""
from inspect import isfunction
import collections
from .iter_exceptions import IterException, NotAllowedOperation
from .others_types import long, NA, EmptyGroup, GroupByContainer

Expand Down Expand Up @@ -727,8 +726,7 @@ def set(self, value):
@param value anything in [int,float,long,str, function ]
"""
self._value = value
if isinstance(value, collections.Iterable) and \
not isinstance(value, str) and \
if not isinstance(value, str) and \
not isinstance(value, GroupByContainer):
raise IterException(
"type of value should be GroupByContainer not {0} for the column {1}".format(
Expand Down

0 comments on commit 6c2404e

Please sign in to comment.