Skip to content

Commit 684de62

Browse files
committed
Accept suggestions from new toolchain
1 parent 3914d89 commit 684de62

35 files changed

+130
-77
lines changed

‎litoid/__main__.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ def cli():
66

77

88
def gui():
9-
from .ui.controller import Controller
109
import time
1110

11+
from .ui.controller import Controller
12+
1213
try:
1314
Controller().start()
1415
finally:

‎litoid/io/dmx.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from functools import cached_property
2+
23
import datacls
34
import pyenttec
45

‎litoid/io/hotkey.py‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
from ..util.has_thread import HasThread
1+
from collections.abc import Callable
22
from functools import cached_property, partial
3-
from pynput import keyboard
4-
from typing import Callable
3+
54
import datacls
5+
from pynput import keyboard
6+
7+
from ..util.has_thread import HasThread
68

79

810
@datacls.mutable

‎litoid/io/key_mouse.py‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
from ..util.has_thread import HasThread
2-
from typing import Callable
1+
from collections.abc import Callable
2+
33
import datacls
44
import pynput
55

6+
from ..util.has_thread import HasThread
7+
68

79
@datacls
810
class _Base(HasThread):

‎litoid/io/midi/midi.py‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
from .message import MidiMessage
1+
import time
2+
from collections.abc import Callable
23
from functools import cached_property
3-
from litoid.util.has_thread import HasThread
4-
from rtmidi import midiutil, MidiIn
5-
from typing import Callable
4+
65
import datacls
76
import mido
8-
import time
7+
from rtmidi import MidiIn, midiutil
8+
9+
from litoid.util.has_thread import HasThread
10+
11+
from .message import MidiMessage
912

1013
SPIN_TIME = 0.003
1114

‎litoid/io/osc.py‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
from ..util.thread_queue import ThreadQueue
1+
from collections.abc import Callable
22
from functools import cached_property
3+
4+
import datacls
35
from pythonosc.dispatcher import Dispatcher
46
from pythonosc.osc_server import BlockingOSCUDPServer
5-
from typing import Callable
6-
import datacls
7+
8+
from ..util.thread_queue import ThreadQueue
79

810

911
@datacls.mutable

‎litoid/io/player.py‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
from .recorder import Recorder
2-
from .track import Track
1+
import time
2+
from collections.abc import Callable
33
from functools import cached_property, total_ordering
4-
from litoid.util.timed_heap import TimedHeap
5-
from typing import Callable
4+
65
import datacls
7-
import time
6+
7+
from litoid.util.timed_heap import TimedHeap
8+
9+
from .recorder import Recorder
10+
from .track import Track
811

912
INFINITE = float('inf')
1013

‎litoid/io/recorder.py‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
from .track import Track
2-
from litoid import log
1+
import time as _time
32
from pathlib import Path
3+
44
import datacls
55
import numpy as np
6-
import time as _time
6+
7+
from litoid import log
8+
9+
from .track import Track
710

811
SEP = '-'
912

‎litoid/io/track.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from functools import cached_property
2+
23
import datacls
34
import numpy as np
45

@@ -42,7 +43,7 @@ def append(self, data: np.ndarray, time: float):
4243
self.count += 1
4344

4445
def asdict(self):
45-
return dict(zip(('times', 'data'), self.astuple()))
46+
return dict(zip(('times', 'data'), self.astuple(), strict=True))
4647

4748
def astuple(self):
4849
return (

‎litoid/litoid.py‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
# DEPRECATED
22

3-
from . import app
4-
from .state import state
53
from functools import cached_property
64
from pathlib import Path
5+
76
import dtyper
87
import xmod
98

9+
from . import app
10+
from .state import state
11+
1012

1113
@xmod
1214
@app.command()

0 commit comments

Comments
 (0)