Skip to content

Commit

Permalink
Add Travis CI integration for flake8 linting. (#2)
Browse files Browse the repository at this point in the history
* Add flake8 linting.

* Fix lint failures.

* Add travis integration.
  • Loading branch information
ecdavis committed Sep 9, 2019
1 parent 613ce93 commit 5ce05d3
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
language: python
python:
- '3.6'
install:
- pip install -e .
- pip install -r test-requirements.txt
script:
- make test
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
test: test_lint

test_lint:
flake8
3 changes: 1 addition & 2 deletions multiprocessing_dag/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import logging
import multiprocessing
import random
import time

logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -91,7 +90,7 @@ def run(self):
if not result:
self.logger.warning(f"Command failure in task '{self.task.uri()}'.")
success = False
except Exception as e: # TODO let KeyboardInterrupt and others bubble up
except Exception: # TODO let KeyboardInterrupt and others bubble up
self.logger.exception(f"Unhandled exception in task '{self.task.uri()}'.")
success = False
self.status_queue.put(success)
Expand Down
4 changes: 4 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[flake8]
format = pylint
exclude = .svc,CVS,.bzr,.hg,.git,__pycache__,venv
max-line-length = 120
1 change: 1 addition & 0 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
flake8

0 comments on commit 5ce05d3

Please sign in to comment.