Skip to content
This repository has been archived by the owner on Jul 3, 2024. It is now read-only.

Commit

Permalink
chore: make pyright happy
Browse files Browse the repository at this point in the history
  • Loading branch information
Mouwrice committed Apr 20, 2024
1 parent 7128e6c commit 746f0d3
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion drumpy/app/fps_display.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class FPSDisplay(UILabel):
"""

def __init__(
self: Self,
self,
ui_manager: UIManager,
media_pipe_pose: MediaPipePose,
) -> None:
Expand Down
2 changes: 1 addition & 1 deletion drumpy/app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class App:
"""

def __init__(
self: Self,
self,
source: Source = Source.CAMERA,
file_path: Optional[str] = None,
running_mode: RunningMode = RunningMode.LIVE_STREAM, # type: ignore
Expand Down
4 changes: 2 additions & 2 deletions drumpy/app/video_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class VideoSource(ABC):
Abstract base class for a video source
"""

def __init__(self: Self) -> None:
def __init__(self) -> None:
self.stopped = False

@abstractmethod
Expand Down Expand Up @@ -145,7 +145,7 @@ class CameraSource(VideoSource):
Class to handle a video source from a camera
"""

def __init__(self: Self, camera_index: int) -> None:
def __init__(self, camera_index: int) -> None:
super().__init__()
camera.init()
cameras = camera.list_cameras()
Expand Down
2 changes: 1 addition & 1 deletion drumpy/drum/drum.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class Drum:
"""

def __init__(
self: Self,
self,
sounds: list[Sound],
sleep_option: SleepOption = SleepOption.SLEEP,
) -> None:
Expand Down
16 changes: 8 additions & 8 deletions drumpy/drum/sound.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class Sound:
"""

def __init__(
self: Self,
self,
name: str,
path: str,
margin: float,
Expand Down Expand Up @@ -117,7 +117,7 @@ def hit(self: Self, position: Position) -> None:


class SnareDrum(Sound):
def __init__(self: Self) -> None:
def __init__(self) -> None:
super().__init__(
"Snare Drum",
"./DrumSamples/Snare/CKV1_Snare Loud.wav",
Expand All @@ -126,7 +126,7 @@ def __init__(self: Self) -> None:


class HiHat(Sound):
def __init__(self: Self) -> None:
def __init__(self) -> None:
super().__init__(
"High Hat",
"./DrumSamples/HiHat/CKV1_HH Closed Loud.wav",
Expand All @@ -135,7 +135,7 @@ def __init__(self: Self) -> None:


class KickDrum(Sound):
def __init__(self: Self) -> None:
def __init__(self) -> None:
super().__init__(
"Kick Drum",
"./DrumSamples/Kick/CKV1_Kick Loud.wav",
Expand All @@ -144,7 +144,7 @@ def __init__(self: Self) -> None:


class HiHatFoot(Sound):
def __init__(self: Self) -> None:
def __init__(self) -> None:
super().__init__(
"High Hat Foot",
"./DrumSamples/HiHat/CKV1_HH Foot.wav",
Expand All @@ -153,7 +153,7 @@ def __init__(self: Self) -> None:


class Tom1(Sound):
def __init__(self: Self) -> None:
def __init__(self) -> None:
super().__init__(
"Tom 1",
"./DrumSamples/Perc/Tom1.wav",
Expand All @@ -162,7 +162,7 @@ def __init__(self: Self) -> None:


class Tom2(Sound):
def __init__(self: Self) -> None:
def __init__(self) -> None:
super().__init__(
"Tom 2",
"./DrumSamples/Perc/Tom2.wav",
Expand All @@ -171,7 +171,7 @@ def __init__(self: Self) -> None:


class Cymbal(Sound):
def __init__(self: Self) -> None:
def __init__(self) -> None:
super().__init__(
"Cymbal",
"./DrumSamples/cymbals/Hop_Crs.wav",
Expand Down
2 changes: 1 addition & 1 deletion drumpy/tracking/drum_trackers.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class DrumTrackers:
Objects of this class are used to update the positions of the trackers
"""

def __init__(self: Self) -> None:
def __init__(self) -> None:
snare_drum = SnareDrum()
hi_hat = HiHat()
kick_drum = KickDrum()
Expand Down
2 changes: 1 addition & 1 deletion drumpy/tracking/marker_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class MarkerTracker:
"""

def __init__(
self: Self,
self,
marker: MarkerEnum,
drum: Drum,
sounds: list[Sound],
Expand Down
4 changes: 2 additions & 2 deletions drumpy/tracking/marker_tracker_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def update(self: Self, markers: list[Landmark]) -> None:

class DrumStick(MarkerTrackerWrapper):
def __init__(
self: Self,
self,
wrist: MarkerEnum,
pinky: MarkerEnum,
index: MarkerEnum,
Expand Down Expand Up @@ -80,7 +80,7 @@ def right_hand(drum: Drum, sounds: list[Sound]) -> MarkerTrackerWrapper:


class Foot(MarkerTrackerWrapper):
def __init__(self: Self, toe_tip: MarkerEnum, tracker: MarkerTracker) -> None:
def __init__(self, toe_tip: MarkerEnum, tracker: MarkerTracker) -> None:
self.toe_tip = toe_tip
self.position: Position = np.array([0, 0, 0])
self.tracker = tracker
Expand Down
2 changes: 1 addition & 1 deletion drumpy/trajectory_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class TrajectoryFile:
Class to read and write the captured data to a CSV file.
"""

def __init__(self: Self, path: str) -> None:
def __init__(self, path: str) -> None:
fieldnames = [
"frame",
"time",
Expand Down

0 comments on commit 746f0d3

Please sign in to comment.