Skip to content

Commit

Permalink
chore: add invalid configuration assertion in naive.py (#471)
Browse files Browse the repository at this point in the history
* Update naive.py

* simplify logical expression

* github action check
  • Loading branch information
0dm authored Aug 28, 2023
1 parent 212452c commit 6040fae
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion openadapt/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import io

from loguru import logger
from PIL import Image, ImageChops
from oa_pynput import keyboard
from PIL import Image, ImageChops
import numpy as np
import sqlalchemy as sa

Expand Down
2 changes: 1 addition & 1 deletion openadapt/playback.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Utilities for playing back ActionEvents."""

from loguru import logger
from oa_pynput import mouse, keyboard
from oa_pynput import keyboard, mouse

from openadapt.common import KEY_EVENTS, MOUSE_EVENTS
from openadapt.models import ActionEvent
Expand Down
2 changes: 1 addition & 1 deletion openadapt/record.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
import tracemalloc

from loguru import logger
from pympler import tracker
from oa_pynput import keyboard, mouse
from pympler import tracker
from tqdm import tqdm
import fire
import mss.tools
Expand Down
2 changes: 1 addition & 1 deletion openadapt/strategies/mixins/sam.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ class MyReplayStrategy(SAMReplayStrategyMixin):
from loguru import logger
from PIL import Image
from segment_anything import (
modeling,
SamAutomaticMaskGenerator,
SamPredictor,
modeling,
sam_model_registry,
)
import matplotlib.axes as axes
Expand Down
1 change: 1 addition & 0 deletions openadapt/strategies/naive.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
PROCESS_EVENTS = True
REPLAY_EVENTS = True
SLEEP = False
assert PROCESS_EVENTS or not SLEEP, "invalid configuration"


class NaiveReplayStrategy(strategies.base.BaseReplayStrategy):
Expand Down
2 changes: 1 addition & 1 deletion openadapt/window/_macos.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
from loguru import logger
import AppKit
import ApplicationServices
import oa_atomacos
import Foundation
import oa_atomacos
import Quartz


Expand Down

0 comments on commit 6040fae

Please sign in to comment.