Skip to content

Commit

Permalink
Remove type annotations that gave errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikonooooo committed Dec 3, 2023
1 parent 2b13f36 commit cc17837
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/processing/clean.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ class Clean:
def __init__(self, state: GameState):
self.state = state

def run(self, window:int):
def run(self, window: int):
self.clean_ball(window)

def incr(self, d: dict[str, int], fr: Frame, incr=1):
def incr(self, d: dict, fr: Frame, incr=1):
"increments frequency of seen ball in frame by 1"
for b in fr.ball_candidates:
d[b] = d.get(b, 0) + incr

def decr(self, d: dict[str, int], fr: Frame):
def decr(self, d: dict, fr: Frame):
"decrements frequency of seen ball in frame by 1"
self.incr(d, fr, incr=-1)

def clean_ball(self, window:int):
def clean_ball(self, window: int):
"assigns ball with highest frame frequency over a window"
freq: dict[str, int] = {} # freq of id over winow
frames = self.state.frames
Expand Down

0 comments on commit cc17837

Please sign in to comment.