sixty-north / asq Goto Github PK
View Code? Open in Web Editor NEWasq is simple implementation of a LINQ-inspired API for Python which operates over Python iterables
License: MIT License
asq is simple implementation of a LINQ-inspired API for Python which operates over Python iterables
License: MIT License
What steps will reproduce the problem?
>>> from asq.initiators import query
>>> x = query([1,2,3,4,5]).where(lambda x: x % 2 == 0)
>>> x.count()
2
>>> x.first()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/entity/python-2.7.3/lib/python2.7/site-packages/asq-1.0-py2.7.egg/asq/queryables.py", line 1486, in first
return self._first() if predicate is None else self._first_predicate(predicate)
File "/usr/local/entity/python-2.7.3/lib/python2.7/site-packages/asq-1.0-py2.7.egg/asq/queryables.py", line 1492, in _first
raise ValueError("Cannot return first() from an empty sequence.")
ValueError: Cannot return first() from an empty sequence.
What is the expected output? What do you see instead?
I think no error because I don't get error in C#
What version of the product are you using? On what operating system?
asq 1.0 (replace queryables.py with 1.0.1 branch's queryables.py) / Python
2.7.3 on cygwin
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 29 May 2012 at 6:56
Hello,
I'd like to create a custom collection which inherits from Queryable
but which also have some specific methods.
My first idea was to do:
from asq.queryables import Queryable
class DoableResults(Queryable):
def __init__(self, context, results) -> None:
super().__init__(results)
self._context = context
def do_it(self):
print("Let's do it with %s" % self._context)
unfortunately if I do
results = DoableResults(None, [1, 2, 3, 4, 5, 6])
results.do_it()
works fine but if I do
results.where(lambda n: n>2)
it returns a Queryable
... I was expecting it to return a DoableResults
I had a look at doc to see if you wrote some information about that
https://asq.readthedocs.io/en/latest/search.html?q=inheritance
but couldn't find much information
So what is a proper way to inherit from Queryable?
I noticed https://asq.readthedocs.io/en/latest/narrative.html#extending-asq
but I don't think it's a correct way to do what I'm looking for as it will create a do_it
method for any Queryable
which is not what I'm looking for.
Some help to tackle this will be great!
Kind regards
Hello,
this is probably a bit out of the scope of asq but maybe implementing a frequency distribution table method could be a nice idea (either adding it directly in asq code, or as an example to extend asq).
The result of this frequency distribution table will be queryable also
Your opinion ?
Kind regards
The narrative documentation for 'Query Chaining' includes a Note as part of a
code sample. The RestructuredText formatting is awry here.
Original issue reported on code.google.com by [email protected]
on 6 Jun 2011 at 8:19
Just a suggestion, that Grouping.to_dictionary() without key and value selectors must behave as to_dictionary(key_selector=lambda x: x.key, value_selector=lambda x: x.to_list())
Just make dict with key->list_of_values structure.
Same for to_lookup()
Asq only does inner join using the join function. How can we do other types of join like left outer join?
Use from asq import query
instead of from asq.initiators import query
.
I read the readme.md every time when I try to use this library.
So sad.
What steps will reproduce the problem?
1. easy_install asq on a Python environment without ordereddict available (e.g. Python 2.6)
What is the expected output?
The install should complete successfully.
What do you see instead?
$ easy_install asq
Searching for asq
Reading http://pypi.python.org/simple/asq/
Reading http://code.google.com/p/asq/
Reading http://code.google.com/p/asq/downloads/detail?name=asq-0.9.tar.gz
Best match: asq 0.9
Downloading http://asq.googlecode.com/files/asq-0.9.tar.gz
Processing asq-0.9.tar.gz
Running asq-0.9/setup.py -q bdist_egg --dist-dir
/var/folders/yD/yD0vSdTiEMe6tWqFrULex++++TI/-Tmp-/easy_install-j0e6ZT/asq-0.9/eg
g-dist-tmp-JP8crp
Could not import OrderedDict. For Python versions earlier than 2.7 install
theordereddict module from the Python Package Index with easy_install
ordereddict.error: Setup script exited with 1
What version of the product are you using? On what operating system?
Python 2.6 on Max OS X.
Please provide any additional information below.
If ordered dict is installed, the the installation proceeds successfully.
Original issue reported on code.google.com by [email protected]
on 14 Mar 2011 at 8:13
What steps will reproduce the problem?
>>> x = query([1,2,3]); _ = x.count(); x.first()
1
>>> x = query([1,2,3]).order_by(); _ = x.count(); x.first()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "build/bdist.cygwin-1.7.9-i686/egg/asq/queryables.py", line 1477, in first
File "build/bdist.cygwin-1.7.9-i686/egg/asq/queryables.py", line 1483, in _first
ValueError: Cannot return first() from an empty sequence.
What is the expected output? What do you see instead?
I think no error because I don't get error in C#
What version of the product are you using? On what operating system?
asq 1.0 / Python 2.7.3 on cygwin
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 19 May 2012 at 3:10
What steps will reproduce the problem?
This code:
dates = query(directories).where(is_date).order_by()
for date in dates:
pass
doesn't enter the loop (the sequence is empty),
whereas this code does:
dates = query(directories).where(is_date).order_by().to_list()
for date in dates:
pass
Original issue reported on code.google.com by [email protected]
on 8 Nov 2011 at 9:00
$ python3
>>> from asq.initiators import query
>>> with open('/usr/bin/dict/words', 'r') as words_file:
>>> words = query(words_file).select(str.strip).to_list()
...
>>> query(words).order_by(len).last()
Traceback (most recent call last):
File "/Users/rjs/dev/virtualenvs/meetup3/lib/python3.3/site-packages/asq/queryables.py", line 2248, in __getitem__
return self.element_at(index)
File "/Users/rjs/dev/virtualenvs/meetup3/lib/python3.3/site-packages/asq/queryables.py", line 808, in element_at
raise OutOfRangeError("Attempt to use negative index.")
asq.queryables.OutOfRangeError: Attempt to use negative index.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/rjs/dev/virtualenvs/meetup3/lib/python3.3/site-packages/asq/queryables.py", line 1709, in _last
return self._iterable[-1]
File "/Users/rjs/dev/virtualenvs/meetup3/lib/python3.3/site-packages/asq/queryables.py", line 2250, in __getitem__
raise IndexError(str(e))
IndexError: Attempt to use negative index.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/rjs/dev/virtualenvs/meetup3/lib/python3.3/site-packages/asq/queryables.py", line 1704, in last
return self._last() if predicate is None else self._last_predicate(predicate)
File "/Users/rjs/dev/virtualenvs/meetup3/lib/python3.3/site-packages/asq/queryables.py", line 1711, in _last
raise ValueError("Cannot return last() from an empty sequence.")
ValueError: Cannot return last() from an empty sequence.
What is the expected output? What do you see instead?
Please use labels and text to provide additional information.
Original issue reported on code.google.com by [email protected]
on 12 Oct 2012 at 6:44
Currently, selector only accepts callable
.
Suggest:
Accept str
and list
like:
def order_by(self, selector):
if callable(selector):
pass
elif isinstance(selector, str):
selector = operator.attrgetter(selector)
elif isinstance(selector, list):
if len(selector) == 1:
selector = operator.itemgetter(selector[0])
else:
raise TypeError
else:
raise TypeError
...
Hello,
Some PEP8 cleanup is required
$ flake8 --ignore E501
./setup.py:25:1: E305 expected 2 blank lines after class or function definition, found 1
./setup.py:52:9: E123 closing bracket does not match indentation of opening bracket's line
./docs/source/conf.py:14:11: E401 multiple imports on one line
./docs/source/conf.py:21:1: E402 module level import not at top of file
./docs/source/conf.py:24:1: E402 module level import not at top of file
./docs/source/conf.py:37:1: E265 block comment should start with '# '
./docs/source/conf.py:42:62: E241 multiple spaces after ','
./docs/source/conf.py:51:1: E265 block comment should start with '# '
./docs/source/conf.py:72:1: E265 block comment should start with '# '
./docs/source/conf.py:76:1: E265 block comment should start with '# '
./docs/source/conf.py:78:1: E265 block comment should start with '# '
./docs/source/conf.py:85:1: E265 block comment should start with '# '
./docs/source/conf.py:88:1: E265 block comment should start with '# '
./docs/source/conf.py:92:1: E265 block comment should start with '# '
./docs/source/conf.py:96:1: E265 block comment should start with '# '
./docs/source/conf.py:102:1: E265 block comment should start with '# '
./docs/source/conf.py:113:1: E265 block comment should start with '# '
./docs/source/conf.py:116:1: E265 block comment should start with '# '
./docs/source/conf.py:120:1: E265 block comment should start with '# '
./docs/source/conf.py:123:1: E265 block comment should start with '# '
./docs/source/conf.py:132:1: E265 block comment should start with '# '
./docs/source/conf.py:141:1: E265 block comment should start with '# '
./docs/source/conf.py:145:1: E265 block comment should start with '# '
./docs/source/conf.py:148:1: E265 block comment should start with '# '
./docs/source/conf.py:152:1: E265 block comment should start with '# '
./docs/source/conf.py:155:1: E265 block comment should start with '# '
./docs/source/conf.py:158:1: E265 block comment should start with '# '
./docs/source/conf.py:161:1: E265 block comment should start with '# '
./docs/source/conf.py:164:1: E265 block comment should start with '# '
./docs/source/conf.py:167:1: E265 block comment should start with '# '
./docs/source/conf.py:170:1: E265 block comment should start with '# '
./docs/source/conf.py:175:1: E265 block comment should start with '# '
./docs/source/conf.py:178:1: E265 block comment should start with '# '
./docs/source/conf.py:187:1: E265 block comment should start with '# '
./docs/source/conf.py:190:1: E265 block comment should start with '# '
./docs/source/conf.py:195:3: E121 continuation line under-indented for hanging indent
./docs/source/conf.py:201:1: E265 block comment should start with '# '
./docs/source/conf.py:205:1: E265 block comment should start with '# '
./docs/source/conf.py:208:1: E265 block comment should start with '# '
./docs/source/conf.py:211:1: E265 block comment should start with '# '
./docs/source/conf.py:214:1: E265 block comment should start with '# '
./docs/source/conf.py:217:1: E265 block comment should start with '# '
./docs/source/conf.py:220:1: E265 block comment should start with '# '
./asq/initiators.py:94:1: E302 expected 2 blank lines, found 1
./asq/initiators.py:101:1: W391 blank line at end of file
./asq/_portability.py:33:5: F401 'itertools.zip_longest as izip_longest' imported but unused
./asq/_portability.py:39:9: F401 'ordereddict.OrderedDict' imported but unused
./asq/_portability.py:51:5: E265 block comment should start with '# '
./asq/_portability.py:99:1: E302 expected 2 blank lines, found 1
./asq/_portability.py:116:1: E302 expected 2 blank lines, found 1
./asq/_portability.py:133:1: E305 expected 2 blank lines after class or function definition, found 1
./asq/_portability.py:177:5: E301 expected 1 blank line, found 0
./asq/_portability.py:178:30: F821 undefined name 'basestring'
./asq/_portability.py:184:1: W391 blank line at end of file
./asq/_portability.py:184:1: W293 blank line contains whitespace
./asq/queryables.py:340:25: E128 continuation line under-indented for visual indent
./asq/queryables.py:350:36: E131 continuation line unaligned for hanging indent
./asq/queryables.py:399:14: E128 continuation line under-indented for visual indent
./asq/queryables.py:403:17: E128 continuation line under-indented for visual indent
./asq/queryables.py:406:17: E126 continuation line over-indented for hanging indent
./asq/queryables.py:464:17: E128 continuation line under-indented for visual indent
./asq/queryables.py:468:14: E128 continuation line under-indented for visual indent
./asq/queryables.py:472:17: E128 continuation line under-indented for visual indent
./asq/queryables.py:574:35: E127 continuation line over-indented for visual indent
./asq/queryables.py:604:17: E128 continuation line under-indented for visual indent
./asq/queryables.py:605:17: E128 continuation line under-indented for visual indent
./asq/queryables.py:640:21: E128 continuation line under-indented for visual indent
./asq/queryables.py:807:29: E128 continuation line under-indented for visual indent
./asq/queryables.py:835:19: E128 continuation line under-indented for visual indent
./asq/queryables.py:980:13: E731 do not assign a lambda expression, use a def
./asq/queryables.py:1165:17: E128 continuation line under-indented for visual indent
./asq/queryables.py:1242:17: E128 continuation line under-indented for visual indent
./asq/queryables.py:1292:16: E128 continuation line under-indented for visual indent
./asq/queryables.py:1296:17: E128 continuation line under-indented for visual indent
./asq/queryables.py:1299:61: E128 continuation line under-indented for visual indent
./asq/queryables.py:1340:16: E128 continuation line under-indented for visual indent
./asq/queryables.py:1387:19: E128 continuation line under-indented for visual indent
./asq/queryables.py:1437:20: E128 continuation line under-indented for visual indent
./asq/queryables.py:1462:14: E128 continuation line under-indented for visual indent
./asq/queryables.py:1514:21: E126 continuation line over-indented for hanging indent
./asq/queryables.py:1518:21: E126 continuation line over-indented for hanging indent
./asq/queryables.py:1522:21: E126 continuation line over-indented for hanging indent
./asq/queryables.py:1526:21: E126 continuation line over-indented for hanging indent
./asq/queryables.py:1529:56: E128 continuation line under-indented for visual indent
./asq/queryables.py:1682:26: E712 comparison to True should be 'if cond is True:' or 'if cond:'
./asq/queryables.py:1686:18: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
./asq/queryables.py:1749:26: E712 comparison to True should be 'if cond is True:' or 'if cond:'
./asq/queryables.py:1987:19: E128 continuation line under-indented for visual indent
./asq/queryables.py:2008:9: E265 block comment should start with '# '
./asq/queryables.py:2023:9: E265 block comment should start with '# '
./asq/queryables.py:2044:21: E128 continuation line under-indented for visual indent
./asq/queryables.py:2047:9: E265 block comment should start with '# '
./asq/queryables.py:2061:21: E126 continuation line over-indented for hanging indent
./asq/queryables.py:2065:21: E126 continuation line over-indented for hanging indent
./asq/queryables.py:2070:9: E265 block comment should start with '# '
./asq/queryables.py:2095:21: E126 continuation line over-indented for hanging indent
./asq/queryables.py:2099:21: E126 continuation line over-indented for hanging indent
./asq/queryables.py:2170:21: E126 continuation line over-indented for hanging indent
./asq/queryables.py:2174:21: E126 continuation line over-indented for hanging indent
./asq/queryables.py:2376:5: E303 too many blank lines (2)
./asq/queryables.py:2456:1: E305 expected 2 blank lines after class or function definition, found 1
./asq/queryables.py:2505:16: F821 undefined name 'unicode'
./asq/queryables.py:2505:52: F821 undefined name 'unicode'
./asq/queryables.py:2553:21: E128 continuation line under-indented for visual indent
./asq/queryables.py:2679:1: W293 blank line contains whitespace
./asq/queryables.py:2813:1: W293 blank line contains whitespace
./asq/queryables.py:2816:53: E128 continuation line under-indented for visual indent
./asq/queryables.py:2841:13: E731 do not assign a lambda expression, use a def
./asq/queryables.py:2844:13: E731 do not assign a lambda expression, use a def
./asq/__init__.py:6:1: F401 '.version.__version__' imported but unused
./asq/__init__.py:7:1: F401 '.initiators.query' imported but unused
./asq/record.py:48:1: W391 blank line at end of file
./asq/namedelements.py:9:1: W391 blank line at end of file
./asq/parallel_queryable.py:11:1: E402 module level import not at top of file
./asq/parallel_queryable.py:29:9: E265 block comment should start with '# '
./asq/parallel_queryable.py:105:37: E128 continuation line under-indented for visual indent
./asq/parallel_queryable.py:106:39: E128 continuation line under-indented for visual indent
./asq/parallel_queryable.py:150:45: E128 continuation line under-indented for visual indent
./asq/parallel_queryable.py:159:9: E731 do not assign a lambda expression, use a def
./asq/parallel_queryable.py:160:9: E731 do not assign a lambda expression, use a def
./asq/parallel_queryable.py:278:13: E265 block comment should start with '# '
./asq/examples/mandelbrot.py:9:1: E265 block comment should start with '# '
./asq/examples/mandelbrot.py:11:1: F401 'asq.initiators.query' imported but unused
./asq/examples/mandelbrot.py:41:5: F811 redefinition of unused 'query' from line 11
./asq/examples/mandelbrot.py:42:13: E127 continuation line over-indented for visual indent
./asq/examples/mandelbrot.py:47:31: E127 continuation line over-indented for visual indent
./asq/examples/mandelbrot.py:52:12: F821 undefined name 'q'
./asq/examples/mandelbrot.py:54:13: F821 undefined name 'Image'
./asq/examples/benchmarks/selectmark.py:8:1: E302 expected 2 blank lines, found 1
./asq/examples/benchmarks/selectmark.py:12:1: E305 expected 2 blank lines after class or function definition, found 1
./asq/examples/benchmarks/selectmark.py:14:1: E302 expected 2 blank lines, found 1
./asq/examples/benchmarks/selectmark.py:18:1: E302 expected 2 blank lines, found 1
./asq/examples/benchmarks/selectmark.py:19:5: F841 local variable 'results' is assigned to but never used
./asq/examples/benchmarks/selectmark.py:21:1: E302 expected 2 blank lines, found 1
./asq/examples/benchmarks/selectmark.py:27:1: E305 expected 2 blank lines after class or function definition, found 1
./asq/examples/benchmarks/selectmark.py:28:21: W292 no newline at end of file
./asq/test/test_grouping.py:4:1: F401 'asq._portability.OrderedDict' imported but unused
./asq/test/test_grouping.py:8:1: E302 expected 2 blank lines, found 1
./asq/test/test_grouping.py:11:9: F841 local variable 'grouping' is assigned to but never used
./asq/test/test_grouping.py:93:1: W391 blank line at end of file
./asq/test/test_asq.py:6:1: E302 expected 2 blank lines, found 1
./asq/test/test_asq.py:10:9: F841 local variable 'b' is assigned to but never used
./asq/test/test_asq.py:17:1: W391 blank line at end of file
./asq/test/test_asq.py:17:1: W293 blank line contains whitespace
./asq/test/test_asq.py:17:1: E303 too many blank lines (3)
./asq/test/test_predicates.py:8:1: E302 expected 2 blank lines, found 1
./asq/test/test_predicates.py:18:1: E302 expected 2 blank lines, found 1
./asq/test/test_predicates.py:28:1: E302 expected 2 blank lines, found 1
./asq/test/test_predicates.py:38:1: E302 expected 2 blank lines, found 1
./asq/test/test_predicates.py:52:1: E302 expected 2 blank lines, found 1
./asq/test/test_predicates.py:66:1: E302 expected 2 blank lines, found 1
./asq/test/test_predicates.py:76:1: E302 expected 2 blank lines, found 1
./asq/test/test_predicates.py:89:1: E302 expected 2 blank lines, found 1
./asq/test/test_predicates.py:101:1: E302 expected 2 blank lines, found 1
./asq/test/test_predicates.py:111:1: E302 expected 2 blank lines, found 1
./asq/test/test_predicates.py:129:1: E302 expected 2 blank lines, found 1
./asq/test/test_predicates.py:147:1: E302 expected 2 blank lines, found 1
./asq/test/test_predicates.py:166:1: W293 blank line contains whitespace
./asq/test/test_predicates.py:168:1: W391 blank line at end of file
./asq/test/test_predicates.py:168:1: W293 blank line contains whitespace
./asq/test/test_predicates.py:168:1: E303 too many blank lines (4)
./asq/test/test_take_while.py:30:9: F841 local variable 'c' is assigned to but never used
./asq/test/test_take_while.py:41:1: W391 blank line at end of file
./asq/test/test_take_while.py:41:1: W293 blank line contains whitespace
./asq/test/test_first.py:7:1: E302 expected 2 blank lines, found 1
./asq/test/test_first.py:28:1: W293 blank line contains whitespace
./asq/test/test_skip_while.py:7:1: E302 expected 2 blank lines, found 1
./asq/test/test_skip_while.py:29:9: F841 local variable 'c' is assigned to but never used
./asq/test/test_skip_while.py:38:68: E203 whitespace before ':'
./asq/test/test_skip_while.py:38:78: W292 no newline at end of file
./asq/test/test_record.py:8:1: E302 expected 2 blank lines, found 1
./asq/test/test_record.py:20:9: F841 local variable 'r' is assigned to but never used
./asq/test/test_record.py:50:10: E225 missing whitespace around operator
./asq/test/test_record.py:57:10: E225 missing whitespace around operator
./asq/test/test_record.py:74:9: F841 local variable 'r' is assigned to but never used
./asq/test/test_record.py:75:1: W293 blank line contains whitespace
./asq/test/test_record.py:80:1: W293 blank line contains whitespace
./asq/test/test_record.py:82:1: W391 blank line at end of file
./asq/test/test_group_join.py:7:1: E302 expected 2 blank lines, found 1
./asq/test/test_group_join.py:25:31: E128 continuation line under-indented for visual indent
./asq/test/test_group_join.py:38:31: E128 continuation line under-indented for visual indent
./asq/test/test_group_join.py:44:31: E128 continuation line under-indented for visual indent
./asq/test/test_group_join.py:50:31: E128 continuation line under-indented for visual indent
./asq/test/test_group_join.py:66:1: W293 blank line contains whitespace
./asq/test/test_group_join.py:68:5: E303 too many blank lines (2)
./asq/test/test_group_join.py:74:9: F841 local variable 'd' is assigned to but never used
./asq/test/test_select_many.py:5:1: E302 expected 2 blank lines, found 1
./asq/test/test_select_many.py:9:46: E203 whitespace before ':'
./asq/test/test_select_many.py:15:46: E203 whitespace before ':'
./asq/test/test_select_many.py:15:72: E226 missing whitespace around arithmetic operator
./asq/test/test_select_many.py:21:107: E226 missing whitespace around arithmetic operator
./asq/test/test_select_many.py:36:1: W293 blank line contains whitespace
./asq/test/test_select_many.py:39:79: E203 whitespace before ':'
./asq/test/test_select_many.py:40:1: W293 blank line contains whitespace
./asq/test/test_select_many.py:44:78: W292 no newline at end of file
./asq/test/test_aggregate.py:7:1: E302 expected 2 blank lines, found 1
./asq/test/test_aggregate.py:21:77: E226 missing whitespace around arithmetic operator
./asq/test/test_aggregate.py:26:64: E226 missing whitespace around arithmetic operator
./asq/test/test_min.py:6:1: E302 expected 2 blank lines, found 1
./asq/test/test_min.py:28:55: W292 no newline at end of file
./asq/test/test_all.py:6:1: E302 expected 2 blank lines, found 1
./asq/test/test_all.py:50:55: W292 no newline at end of file
./asq/test/test_last_or_default.py:6:1: E302 expected 2 blank lines, found 1
./asq/test/test_last_or_default.py:78:1: W293 blank line contains whitespace
./asq/test/test_reverse.py:7:1: E302 expected 2 blank lines, found 1
./asq/test/test_reverse.py:28:9: F841 local variable 'b' is assigned to but never used
./asq/test/test_reverse.py:30:31: W292 no newline at end of file
./asq/test/test_join.py:7:1: E302 expected 2 blank lines, found 1
./asq/test/test_join.py:33:31: E128 continuation line under-indented for visual indent
./asq/test/test_join.py:39:31: E128 continuation line under-indented for visual indent
./asq/test/test_join.py:45:31: E128 continuation line under-indented for visual indent
./asq/test/test_join.py:70:1: W391 blank line at end of file
./asq/test/test_join.py:70:1: W293 blank line contains whitespace
./asq/test/test_lookup.py:6:1: E302 expected 2 blank lines, found 1
./asq/test/test_lookup.py:9:16: E201 whitespace after '['
./asq/test/test_lookup.py:14:36: E202 whitespace before ']'
./asq/test/test_lookup.py:16:9: F841 local variable 'lookup' is assigned to but never used
./asq/test/test_lookup.py:19:16: E201 whitespace after '['
./asq/test/test_lookup.py:24:36: E202 whitespace before ']'
./asq/test/test_lookup.py:30:9: F841 local variable 'lookup' is assigned to but never used
./asq/test/test_lookup.py:33:16: E201 whitespace after '['
./asq/test/test_lookup.py:38:36: E202 whitespace before ']'
./asq/test/test_lookup.py:44:16: E201 whitespace after '['
./asq/test/test_lookup.py:49:36: E202 whitespace before ']'
./asq/test/test_lookup.py:54:5: F811 redefinition of unused 'test_lookup_in_positive' from line 43
./asq/test/test_lookup.py:55:16: E201 whitespace after '['
./asq/test/test_lookup.py:60:36: E202 whitespace before ']'
./asq/test/test_lookup.py:66:16: E201 whitespace after '['
./asq/test/test_lookup.py:71:36: E202 whitespace before ']'
./asq/test/test_lookup.py:77:5: E303 too many blank lines (2)
./asq/test/test_lookup.py:78:16: E201 whitespace after '['
./asq/test/test_lookup.py:83:36: E202 whitespace before ']'
./asq/test/test_lookup.py:102:16: E201 whitespace after '['
./asq/test/test_lookup.py:107:36: E202 whitespace before ']'
./asq/test/test_lookup.py:110:1: W293 blank line contains whitespace
./asq/test/test_lookup.py:127:16: E201 whitespace after '['
./asq/test/test_lookup.py:132:36: E202 whitespace before ']'
./asq/test/test_lookup.py:142:16: E201 whitespace after '['
./asq/test/test_lookup.py:147:36: E202 whitespace before ']'
./asq/test/test_lookup.py:155:1: W293 blank line contains whitespace
./asq/test/test_lookup.py:157:16: E201 whitespace after '['
./asq/test/test_lookup.py:162:36: E202 whitespace before ']'
./asq/test/test_lookup.py:172:16: E201 whitespace after '['
./asq/test/test_lookup.py:177:36: E202 whitespace before ']'
./asq/test/test_lookup.py:194:5: E303 too many blank lines (2)
./asq/test/test_lookup.py:195:16: E201 whitespace after '['
./asq/test/test_lookup.py:200:36: E202 whitespace before ']'
./asq/test/test_lookup.py:208:16: E201 whitespace after '['
./asq/test/test_lookup.py:213:36: E202 whitespace before ']'
./asq/test/test_lookup.py:216:16: E201 whitespace after '['
./asq/test/test_lookup.py:221:36: E202 whitespace before ']'
./asq/test/test_lookup.py:223:1: W293 blank line contains whitespace
./asq/test/test_lookup.py:227:16: E201 whitespace after '['
./asq/test/test_lookup.py:232:36: E202 whitespace before ']'
./asq/test/test_lookup.py:235:16: E201 whitespace after '['
./asq/test/test_lookup.py:240:36: E202 whitespace before ']'
./asq/test/test_lookup.py:246:16: E201 whitespace after '['
./asq/test/test_lookup.py:251:36: E202 whitespace before ']'
./asq/test/test_lookup.py:254:16: E201 whitespace after '['
./asq/test/test_lookup.py:259:36: E202 whitespace before ']'
./asq/test/test_lookup.py:265:16: E201 whitespace after '['
./asq/test/test_lookup.py:270:36: E202 whitespace before ']'
./asq/test/test_lookup.py:273:16: E201 whitespace after '['
./asq/test/test_lookup.py:278:36: E202 whitespace before ']'
./asq/test/test_lookup.py:284:16: E201 whitespace after '['
./asq/test/test_lookup.py:289:36: E202 whitespace before ']'
./asq/test/test_lookup.py:299:16: E201 whitespace after '['
./asq/test/test_lookup.py:304:36: E202 whitespace before ']'
./asq/test/test_lookup.py:316:1: W391 blank line at end of file
./asq/test/test_relational.py:7:1: E302 expected 2 blank lines, found 1
./asq/test/test_relational.py:28:10: E111 indentation is not a multiple of four
./asq/test/test_relational.py:29:10: E111 indentation is not a multiple of four
./asq/test/test_relational.py:30:10: E111 indentation is not a multiple of four
./asq/test/test_relational.py:31:10: E111 indentation is not a multiple of four
./asq/test/test_relational.py:69:1: E302 expected 2 blank lines, found 1
./asq/test/test_relational.py:90:10: E111 indentation is not a multiple of four
./asq/test/test_relational.py:91:10: E111 indentation is not a multiple of four
./asq/test/test_relational.py:92:10: E111 indentation is not a multiple of four
./asq/test/test_relational.py:93:10: E111 indentation is not a multiple of four
./asq/test/test_relational.py:131:1: W391 blank line at end of file
./asq/test/test_relational.py:131:1: W293 blank line contains whitespace
./asq/test/test_any.py:7:1: E302 expected 2 blank lines, found 1
./asq/test/test_any.py:34:9: F841 local variable 'b' is assigned to but never used
./asq/test/test_any.py:42:55: W292 no newline at end of file
./asq/test/test_to_dictionary.py:6:1: E302 expected 2 blank lines, found 1
./asq/test/test_to_dictionary.py:44:44: E231 missing whitespace after ':'
./asq/test/test_to_dictionary.py:61:1: W293 blank line contains whitespace
./asq/test/test_to_dictionary.py:62:1: W391 blank line at end of file
./asq/test/test_to_str.py:6:1: E302 expected 2 blank lines, found 1
./asq/test/test_average.py:33:1: W391 blank line at end of file
./asq/test/test_to_set.py:6:1: E302 expected 2 blank lines, found 1
./asq/test/test_concat.py:7:1: E302 expected 2 blank lines, found 1
./asq/test/test_concat.py:25:9: F841 local variable 'c' is assigned to but never used
./asq/test/test_concat.py:37:1: W391 blank line at end of file
./asq/test/test_concat.py:37:1: W293 blank line contains whitespace
./asq/test/test_count.py:6:1: E302 expected 2 blank lines, found 1
./asq/test/test_count.py:40:1: W293 blank line contains whitespace
./asq/test/test_count.py:44:57: W292 no newline at end of file
./asq/test/test_comparers.py:6:1: E302 expected 2 blank lines, found 1
./asq/test/test_comparers.py:13:1: W391 blank line at end of file
./asq/test/test_single.py:6:1: E302 expected 2 blank lines, found 1
./asq/test/test_single.py:43:1: W391 blank line at end of file
./asq/test/test_contains.py:7:1: E302 expected 2 blank lines, found 1
./asq/test/test_contains.py:73:1: W391 blank line at end of file
./asq/test/test_contains.py:73:1: W293 blank line contains whitespace
./asq/test/test_to_lookup.py:6:1: E302 expected 2 blank lines, found 1
./asq/test/test_to_lookup.py:70:1: W293 blank line contains whitespace
./asq/test/test_queryable.py:46:22: E226 missing whitespace around arithmetic operator
./asq/test/test_range.py:6:1: E302 expected 2 blank lines, found 1
./asq/test/test_range.py:12:5: F811 redefinition of unused 'test_range' from line 8
./asq/test/test_range.py:22:1: W391 blank line at end of file
./asq/test/test_as_parallel.py:14:67: W292 no newline at end of file
./asq/test/test_take.py:7:1: E302 expected 2 blank lines, found 1
./asq/test/test_take.py:49:9: F841 local variable 'c' is assigned to but never used
./asq/test/test_take.py:56:57: W292 no newline at end of file
./asq/test/test_last.py:6:1: E302 expected 2 blank lines, found 1
./asq/test/test_last.py:47:5: E303 too many blank lines (2)
./asq/test/test_last.py:57:1: W293 blank line contains whitespace
./asq/test/test_last.py:58:5: E303 too many blank lines (2)
./asq/test/test_last.py:73:1: W293 blank line contains whitespace
./asq/test/test_last.py:79:1: W391 blank line at end of file
./asq/test/test_last.py:79:1: W293 blank line contains whitespace
./asq/test/test_distinct.py:7:1: E302 expected 2 blank lines, found 1
./asq/test/test_distinct.py:37:60: W292 no newline at end of file
./asq/test/test_to_list.py:6:1: E302 expected 2 blank lines, found 1
./asq/test/test_skip.py:7:1: E302 expected 2 blank lines, found 1
./asq/test/test_skip.py:8:1: W293 blank line contains whitespace
./asq/test/test_skip.py:62:9: F841 local variable 'c' is assigned to but never used
./asq/test/test_skip.py:70:1: W293 blank line contains whitespace
./asq/test/test_skip.py:71:1: W293 blank line contains whitespace
./asq/test/test_skip.py:72:1: W391 blank line at end of file
./asq/test/test_skip.py:72:1: W293 blank line contains whitespace
./asq/test/test_str.py:6:1: E302 expected 2 blank lines, found 1
./asq/test/test_default_if_empty.py:7:1: E302 expected 2 blank lines, found 1
./asq/test/test_default_if_empty.py:27:9: F841 local variable 'c' is assigned to but never used
./asq/test/test_select_with_index.py:16:58: E226 missing whitespace around arithmetic operator
./asq/test/test_select_with_index.py:22:58: E226 missing whitespace around arithmetic operator
./asq/test/test_select_with_index.py:42:81: E226 missing whitespace around arithmetic operator
./asq/test/test_select_with_index.py:43:1: W391 blank line at end of file
./asq/test/test_order_by.py:7:1: E302 expected 2 blank lines, found 1
./asq/test/test_order_by.py:17:1: E302 expected 2 blank lines, found 1
./asq/test/test_order_by.py:18:13: E701 multiple statements on one line (colon)
./asq/test/test_order_by.py:19:15: E701 multiple statements on one line (colon)
./asq/test/test_order_by.py:22:1: E302 expected 2 blank lines, found 1
./asq/test/test_order_by.py:54:5: E303 too many blank lines (3)
./asq/test/test_order_by.py:75:1: W293 blank line contains whitespace
./asq/test/test_order_by.py:77:1: W293 blank line contains whitespace
./asq/test/test_order_by.py:93:5: E303 too many blank lines (2)
./asq/test/test_order_by.py:160:1: W391 blank line at end of file
./asq/test/test_select_many_with_correspondence.py:5:1: E302 expected 2 blank lines, found 1
./asq/test/test_selectors.py:4:1: F401 'asq.test.test_queryable.TracingGenerator' imported but unused
./asq/test/test_selectors.py:4:1: F401 'asq.test.test_queryable.infinite' imported but unused
./asq/test/test_selectors.py:8:1: E302 expected 2 blank lines, found 1
./asq/test/test_selectors.py:15:22: E203 whitespace before ':'
./asq/test/test_selectors.py:15:34: E203 whitespace before ':'
./asq/test/test_selectors.py:15:47: E203 whitespace before ':'
./asq/test/test_selectors.py:20:22: E203 whitespace before ':'
./asq/test/test_selectors.py:20:34: E203 whitespace before ':'
./asq/test/test_selectors.py:20:47: E203 whitespace before ':'
./asq/test/test_selectors.py:24:1: E302 expected 2 blank lines, found 1
./asq/test/test_selectors.py:47:1: E302 expected 2 blank lines, found 1
./asq/test/test_selectors.py:81:42: E251 unexpected spaces around keyword / parameter equals
./asq/test/test_selectors.py:81:44: E251 unexpected spaces around keyword / parameter equals
./asq/test/test_selectors.py:81:53: E251 unexpected spaces around keyword / parameter equals
./asq/test/test_selectors.py:81:55: E251 unexpected spaces around keyword / parameter equals
./asq/test/test_selectors.py:84:1: E302 expected 2 blank lines, found 1
./asq/test/test_selectors.py:88:56: W292 no newline at end of file
./asq/test/test_select_with_corresponding.py:9:1: W293 blank line contains whitespace
./asq/test/test_select_with_corresponding.py:33:31: E226 missing whitespace around arithmetic operator
./asq/test/test_select_with_corresponding.py:39:34: E226 missing whitespace around arithmetic operator
./asq/test/test_where.py:7:1: E302 expected 2 blank lines, found 1
./asq/test/test_where.py:30:9: F841 local variable 'c' is assigned to but never used
./asq/test/test_where.py:34:5: E303 too many blank lines (2)
./asq/test/test_where.py:38:77: W292 no newline at end of file
./asq/test/test_union.py:7:1: E302 expected 2 blank lines, found 1
./asq/test/test_union.py:32:31: E203 whitespace before ','
./asq/test/test_union.py:52:9: F841 local variable 'd' is assigned to but never used
./asq/test/test_extension.py:8:1: E302 expected 2 blank lines, found 1
./asq/test/test_extension.py:25:1: W293 blank line contains whitespace
./asq/test/test_extension.py:67:1: W293 blank line contains whitespace
./asq/test/test_sum.py:6:1: E302 expected 2 blank lines, found 1
./asq/test/test_sum.py:21:1: W293 blank line contains whitespace
./asq/test/test_sum.py:31:1: W391 blank line at end of file
./asq/test/test_sum.py:31:1: W293 blank line contains whitespace
./asq/test/test_max.py:6:1: E302 expected 2 blank lines, found 1
./asq/test/test_max.py:21:1: W293 blank line contains whitespace
./asq/test/test_max.py:28:55: W292 no newline at end of file
./asq/test/test_element_at.py:7:1: E302 expected 2 blank lines, found 1
./asq/test/test_zip.py:7:1: E302 expected 2 blank lines, found 1
./asq/test/test_zip.py:74:1: W391 blank line at end of file
./asq/test/test_zip.py:74:1: W293 blank line contains whitespace
./asq/test/test_repeat.py:6:1: E302 expected 2 blank lines, found 1
./asq/test/test_repeat.py:20:1: W391 blank line at end of file
./asq/test/test_repeat.py:20:1: W293 blank line contains whitespace
./asq/test/test_unicode.py:12:1: W293 blank line contains whitespace
./asq/test/test_unicode.py:13:9: F821 undefined name 'unicode'
./asq/test/test_unicode.py:19:17: F821 undefined name 'unicode'
./asq/test/test_unicode.py:25:17: F821 undefined name 'unicode'
./asq/test/test_unicode.py:31:17: F821 undefined name 'unicode'
./asq/test/test_unicode.py:36:17: F821 undefined name 'unicode'
./asq/test/test_unicode.py:44:51: F821 undefined name 'unicode'
./asq/test/test_intersect.py:7:1: E302 expected 2 blank lines, found 1
./asq/test/test_intersect.py:52:9: F841 local variable 'd' is assigned to but never used
./asq/test/test_intersect.py:68:62: W292 no newline at end of file
./asq/test/test_empty.py:6:1: E302 expected 2 blank lines, found 1
./asq/test/test_empty.py:18:1: W391 blank line at end of file
./asq/test/test_empty.py:18:1: W293 blank line contains whitespace
./asq/test/test_empty.py:18:1: E303 too many blank lines (5)
./asq/test/test_pre_scan.py:7:1: E302 expected 2 blank lines, found 1
./asq/test/test_pre_scan.py:52:1: W391 blank line at end of file
./asq/test/test_pre_scan.py:52:1: W293 blank line contains whitespace
./asq/test/test_of_type.py:6:1: E302 expected 2 blank lines, found 1
./asq/test/test_of_type.py:33:62: W292 no newline at end of file
./asq/test/test_group_by.py:6:1: E302 expected 2 blank lines, found 1
./asq/test/test_group_by.py:48:38: E128 continuation line under-indented for visual indent
./asq/test/test_group_by.py:51:5: E303 too many blank lines (2)
./asq/test/test_group_by.py:68:35: E128 continuation line under-indented for visual indent
./asq/test/test_single_or_default.py:6:1: E302 expected 2 blank lines, found 1
./asq/test/test_single_or_default.py:50:1: W391 blank line at end of file
./asq/test/test_single_or_default.py:50:1: W293 blank line contains whitespace
./asq/test/test_log.py:6:1: E302 expected 2 blank lines, found 1
./asq/test/test_log.py:14:1: E302 expected 2 blank lines, found 1
./asq/test/test_log.py:29:9: F841 local variable 'b' is assigned to but never used
./asq/test/test_log.py:40:9: F841 local variable 'b' is assigned to but never used
./asq/test/test_log.py:55:9: F841 local variable 'b' is assigned to but never used
./asq/test/test_log.py:62:9: F841 local variable 'b' is assigned to but never used
./asq/test/test_log.py:69:9: F841 local variable 'b' is assigned to but never used
./asq/test/test_log.py:93:9: F841 local variable 'b' is assigned to but never used
./asq/test/test_log.py:121:38: E202 whitespace before ']'
./asq/test/test_getitem.py:7:1: E302 expected 2 blank lines, found 1
./asq/test/test_scan.py:7:1: E302 expected 2 blank lines, found 1
./asq/test/test_scan.py:52:1: W391 blank line at end of file
./asq/test/test_scan.py:52:1: W293 blank line contains whitespace
./asq/test/test_difference.py:7:1: E302 expected 2 blank lines, found 1
./asq/test/test_difference.py:52:9: F841 local variable 'd' is assigned to but never used
./asq/test/test_difference.py:67:1: W391 blank line at end of file
./asq/test/test_difference.py:67:1: W293 blank line contains whitespace
./asq/test/test_select.py:8:1: E302 expected 2 blank lines, found 1
./asq/test/test_select.py:12:44: E226 missing whitespace around arithmetic operator
./asq/test/test_select.py:27:44: E226 missing whitespace around arithmetic operator
./asq/test/test_select.py:32:44: E226 missing whitespace around arithmetic operator
./asq/test/test_select.py:39:44: E226 missing whitespace around arithmetic operator
./asq/test/test_select.py:41:9: F841 local variable 'c' is assigned to but never used
./asq/test/test_select.py:47:1: W293 blank line contains whitespace
./asq/test/test_select.py:51:73: W292 no newline at end of file
./asq/test/test_to_tuple.py:4:1: E302 expected 2 blank lines, found 1
./asq/test/test_select_many_with_index.py:7:1: E302 expected 2 blank lines, found 1
./asq/test/test_select_many_with_index.py:10:21: E203 whitespace before ':'
./asq/test/test_select_many_with_index.py:10:42: E203 whitespace before ':'
./asq/test/test_select_many_with_index.py:10:120: E202 whitespace before ']'
./asq/test/test_select_many_with_index.py:10:122: E202 whitespace before '}'
./asq/test/test_select_many_with_index.py:11:21: E203 whitespace before ':'
./asq/test/test_select_many_with_index.py:11:30: E241 multiple spaces after ','
./asq/test/test_select_many_with_index.py:11:42: E203 whitespace before ':'
./asq/test/test_select_many_with_index.py:11:57: E202 whitespace before ']'
./asq/test/test_select_many_with_index.py:12:21: E203 whitespace before ':'
./asq/test/test_select_many_with_index.py:12:42: E203 whitespace before ':'
./asq/test/test_select_many_with_index.py:19:21: E203 whitespace before ':'
./asq/test/test_select_many_with_index.py:19:42: E203 whitespace before ':'
./asq/test/test_select_many_with_index.py:19:120: E202 whitespace before ']'
./asq/test/test_select_many_with_index.py:19:122: E202 whitespace before '}'
./asq/test/test_select_many_with_index.py:20:21: E203 whitespace before ':'
./asq/test/test_select_many_with_index.py:20:30: E241 multiple spaces after ','
./asq/test/test_select_many_with_index.py:20:42: E203 whitespace before ':'
./asq/test/test_select_many_with_index.py:20:57: E202 whitespace before ']'
./asq/test/test_select_many_with_index.py:21:21: E203 whitespace before ':'
./asq/test/test_select_many_with_index.py:21:42: E203 whitespace before ':'
./asq/test/test_select_many_with_index.py:25:21: E203 whitespace before ':'
./asq/test/test_select_many_with_index.py:25:42: E203 whitespace before ':'
./asq/test/test_select_many_with_index.py:25:120: E202 whitespace before ']'
./asq/test/test_select_many_with_index.py:25:122: E202 whitespace before '}'
./asq/test/test_select_many_with_index.py:26:21: E203 whitespace before ':'
./asq/test/test_select_many_with_index.py:26:30: E241 multiple spaces after ','
./asq/test/test_select_many_with_index.py:26:42: E203 whitespace before ':'
./asq/test/test_select_many_with_index.py:26:57: E202 whitespace before ']'
./asq/test/test_select_many_with_index.py:27:21: E203 whitespace before ':'
./asq/test/test_select_many_with_index.py:27:42: E203 whitespace before ':'
./asq/test/test_select_many_with_index.py:29:49: E128 continuation line under-indented for visual indent
./asq/test/test_select_many_with_index.py:46:21: E203 whitespace before ':'
./asq/test/test_select_many_with_index.py:46:42: E203 whitespace before ':'
./asq/test/test_select_many_with_index.py:46:120: E202 whitespace before ']'
./asq/test/test_select_many_with_index.py:46:122: E202 whitespace before '}'
./asq/test/test_select_many_with_index.py:47:21: E203 whitespace before ':'
./asq/test/test_select_many_with_index.py:47:30: E241 multiple spaces after ','
./asq/test/test_select_many_with_index.py:47:42: E203 whitespace before ':'
./asq/test/test_select_many_with_index.py:47:57: E202 whitespace before ']'
./asq/test/test_select_many_with_index.py:48:21: E203 whitespace before ':'
./asq/test/test_select_many_with_index.py:48:42: E203 whitespace before ':'
./asq/test/test_select_many_with_index.py:51:131: W292 no newline at end of file
./asq/test/test_reversed.py:7:1: E302 expected 2 blank lines, found 1
./asq/test/test_reversed.py:28:9: F841 local variable 'b' is assigned to but never used
./asq/test/test_reversed.py:30:31: W292 no newline at end of file
./asq/test/test_to_unicode.py:13:9: F821 undefined name 'unicode'
./asq/test/test_first_or_default.py:7:1: E302 expected 2 blank lines, found 1
./asq/test/test_first_or_default.py:29:9: F841 local variable 'a' is assigned to but never used
./asq/test/test_first_or_default.py:41:1: W293 blank line contains whitespace
./asq/test/test_sequence_equal.py:7:1: E302 expected 2 blank lines, found 1
./asq/test/test_sequence_equal.py:28:10: E111 indentation is not a multiple of four
./asq/test/test_sequence_equal.py:29:10: E111 indentation is not a multiple of four
./asq/test/test_sequence_equal.py:30:10: E111 indentation is not a multiple of four
./asq/test/test_sequence_equal.py:31:10: E111 indentation is not a multiple of four
./asq/test/test_sequence_equal.py:84:1: W293 blank line contains whitespace
./asq/test/test_sequence_equal.py:93:1: W391 blank line at end of file
It's possible to add this kind of check to Travis using the following .travis.yml
language: python
python:
- "2.7"
- "3.3"
- "3.4"
- "3.5"
- "3.6"
install:
- "pip install -qq flake8"
- "pip install ."
script:
- nosetests
- flake8 --version
- flake8 --ignore E501 asq
Kind regards
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.