Skip to content

Commit

Permalink
Merge pull request #2390 from bdarnell/lint
Browse files Browse the repository at this point in the history
Fix lint checks
  • Loading branch information
bdarnell authored May 18, 2018
2 parents 5df3e39 + 2f29baa commit 697bbe9
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ install:
- travis_retry pip install codecov virtualenv
# Create a separate no-dependencies virtualenv to make sure all imports
# of optional-dependencies are guarded.
- virtualenv ./nodeps
- ./nodeps/bin/python -VV
- ./nodeps/bin/python setup.py install
- virtualenv /tmp/nodeps
- /tmp/nodeps/bin/python -VV
- /tmp/nodeps/bin/python setup.py install
- curl-config --version; pip freeze

script:
Expand Down Expand Up @@ -76,13 +76,13 @@ script:
- if [[ $TRAVIS_PYTHON_VERSION == 2* ]]; then python $TARGET --resolver=tornado.platform.twisted.TwistedResolver; fi
- if [[ $TRAVIS_PYTHON_VERSION == 2* ]]; then python $TARGET --ioloop=tornado.ioloop.PollIOLoop --ioloop_time_monotonic; fi
#- if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then python $TARGET --resolver=tornado.platform.caresresolver.CaresResolver; fi
- if [[ $TRAVIS_PYTHON_VERSION != 'pypy3' ]]; then ../nodeps/bin/python -m tornado.test.runtests; fi
- if [[ $TRAVIS_PYTHON_VERSION != 'pypy3' ]]; then /tmp/nodeps/bin/python -m tornado.test.runtests; fi
# make coverage reports for Codecov to find
- if [[ "$RUN_COVERAGE" == 1 ]]; then coverage xml; fi
- export TORNADO_EXTENSION=0
- if [[ $TRAVIS_PYTHON_VERSION == 3.6 ]]; then cd ../docs && mkdir sphinx-out && sphinx-build -E -n -W -b html . sphinx-out; fi
- if [[ $TRAVIS_PYTHON_VERSION == 3.6 ]]; then cd ../docs && mkdir sphinx-doctest-out && sphinx-build -E -n -b doctest . sphinx-out; fi
- if [[ $TRAVIS_PYTHON_VERSION == '3.6' ]]; then flake8; fi
- if [[ $TRAVIS_PYTHON_VERSION == '3.6' ]]; then cd .. && flake8; fi

after_success:
# call codecov from project root
Expand Down
3 changes: 2 additions & 1 deletion demos/blog/blog.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ async def prepare(self):
# self.current_user in prepare instead.
user_id = self.get_secure_cookie("blogdemo_user")
if user_id:
self.current_user = await self.queryone("SELECT * FROM authors WHERE id = %s", int(user_id))
self.current_user = await self.queryone("SELECT * FROM authors WHERE id = %s",
int(user_id))

async def any_author_exists(self):
return bool(await self.query("SELECT * FROM authors LIMIT 1"))
Expand Down
2 changes: 1 addition & 1 deletion tornado/locks.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ class Lock(object):
A Lock can be used as an async context manager with the ``async
with`` statement:
>>> from tornado import gen, locks
>>> from tornado import locks
>>> lock = locks.Lock()
>>>
>>> async def f():
Expand Down
4 changes: 2 additions & 2 deletions tornado/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,9 +542,9 @@ def set_cookie(self, name, value, domain=None, expires=None, path="/",
Newly-set cookies are not immediately visible via `get_cookie`;
they are not present until the next request.
expires may be a numeric timestamp as returned by `time.time`,
a time tuple as returned by `time.gmtime`, or a
a time tuple as returned by `time.gmtime`, or a
`datetime.datetime` object.
Additional keyword arguments are set on the cookies.Morsel
Expand Down
2 changes: 1 addition & 1 deletion tornado/websocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
from tornado import gen, httpclient, httputil
from tornado.ioloop import IOLoop, PeriodicCallback
from tornado.iostream import StreamClosedError
from tornado.log import gen_log, app_log
from tornado.log import gen_log
from tornado import simple_httpclient
from tornado.queues import Queue
from tornado.tcpclient import TCPClient
Expand Down

0 comments on commit 697bbe9

Please sign in to comment.