Skip to content
This repository has been archived by the owner on Apr 5, 2023. It is now read-only.

Commit

Permalink
Run flake8 as part of Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
bmerry committed Oct 23, 2018
1 parent 1418f55 commit c2eba59
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[flake8]
max-line-length = 100
exclude = .git,src,build,doc/conf.py
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ install:
- pip install .
script:
- pytest --forked
- flake8
2 changes: 1 addition & 1 deletion birdisle/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import os

from . import _birdisle
from ._version import __version__
from ._version import __version__ # noqa: F401


class Server(object):
Expand Down
5 changes: 2 additions & 3 deletions builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@
void birdisleAddConnection(birdisleServer *handle, int fd);
""")

ffibuilder.set_source("birdisle._birdisle", """
#include "birdisle.h"
""",
ffibuilder.set_source(
"birdisle._birdisle", '#include "birdisle.h"\n',
libraries=['birdisle'],
include_dirs=['src/src'],
library_dirs=['src/src'],
Expand Down
1 change: 1 addition & 0 deletions requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ cffi
redis
pytest
pytest-forked
flake8

aioredis; python_version>="3.5"
pytest-asyncio; python_version>="3.5"
Expand Down
7 changes: 5 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,17 @@ async-timeout==2.0.1 ; python_version >= "3.5"
atomicwrites==1.2.1 # via pytest
attrs==18.2.0 # via pytest
cffi==1.11.5
flake8==3.5.0
hiredis==0.2.0 # via aioredis
mccabe==0.6.1 # via flake8
more-itertools==4.3.0 # via pytest
pathlib2==2.3.2 # via pytest
pluggy==0.7.1 # via pytest
py==1.7.0 # via pytest
pycodestyle==2.3.1 # via flake8
pycparser==2.19 # via cffi
pyflakes==1.6.0 # via flake8
pytest-asyncio==0.9.0 ; python_version >= "3.5"
pytest-forked==0.2
pytest==3.8.2
redis==2.10.6
six==1.11.0 # via more-itertools, pathlib2, pytest
six==1.11.0 # via more-itertools, pytest
1 change: 0 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@
collect_ignore = []
if sys.version_info < (3, 5):
collect_ignore.append('test_aioredis.py')

1 change: 1 addition & 0 deletions tests/test_aioredis.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ async def test_create_redis(r):
val = await r.get('hello')
assert val == b'world'


@pytest.mark.asyncio
async def test_pubsub(redis_pool):
res = await redis_pool.subscribe('chan')
Expand Down
1 change: 0 additions & 1 deletion tests/test_birdisle.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import time
import threading
import locale
import socket
import resource
import signal

Expand Down

0 comments on commit c2eba59

Please sign in to comment.