Skip to content

Commit

Permalink
Merge branch 'no-cond-deps'
Browse files Browse the repository at this point in the history
PR #1370.

* no-cond-deps:
  Run tests without cond vars install
  Make prcheck pass without needing cond deps
  • Loading branch information
jamesls committed Mar 3, 2020
2 parents ae03c65 + a49208a commit b79470d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
15 changes: 9 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
language: python
sudo: false
env:
global:
- INSTALL_STRING=".[event-file-poller]" TEST_TYPE=prcheck HYPOTHESIS_PROFILE=ci
matrix:
include:
- python: "3.8"
dist: xenial
sudo: true
env: TEST_TYPE=prcheck HYPOTHESIS_PROFILE=ci
env: INSTALL_STRING="."
- python: "3.8"
dist: xenial
sudo: true
- python: "3.7"
dist: xenial
sudo: true
env: TEST_TYPE=prcheck HYPOTHESIS_PROFILE=ci
- python: "3.6"
env: TEST_TYPE=prcheck HYPOTHESIS_PROFILE=ci
- python: "2.7"
env: TEST_TYPE=prcheck-py2 HYPOTHESIS_PROFILE=ci
env: TEST_TYPE=prcheck-py2
install:
- pip install -r requirements-dev.txt -r requirements-docs.txt
- pip install -e .
- pip install -e ".[event-file-poller]"
- pip install -e "$INSTALL_STRING"
script:
- env
- make $TEST_TYPE
Expand Down
9 changes: 4 additions & 5 deletions chalice/cli/filewatch/eventbased.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import threading # noqa

from typing import Callable, Optional # noqa
import watchdog.observers
from watchdog.events import FileSystemEventHandler
from watchdog.events import FileSystemEvent # noqa
import watchdog.observers # pylint: disable=import-error
from watchdog import events # pylint: disable=import-error

from chalice.cli.filewatch import FileWatcher, WorkerProcess

Expand All @@ -27,15 +26,15 @@ def watch_for_file_changes(self, root_dir, callback):
observer.start()


class WatchdogRestarter(FileSystemEventHandler):
class WatchdogRestarter(events.FileSystemEventHandler):

def __init__(self, restart_event):
# type: (threading.Event) -> None
# The reason we're using threading
self.restart_event = restart_event

def on_any_event(self, event):
# type: (FileSystemEvent) -> None
# type: (events.FileSystemEvent) -> None
# If we modify a file we'll get a FileModifiedEvent
# as well as a DirectoryModifiedEvent.
# We only care about reloading is a file is modified.
Expand Down

0 comments on commit b79470d

Please sign in to comment.