Skip to content

Commit

Permalink
Fix mypy type check
Browse files Browse the repository at this point in the history
  • Loading branch information
Andi Kleen committed Apr 19, 2024
1 parent eba837c commit 0d79211
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion toplev.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,12 @@ def unsup_event(e, table, kernel_version, min_kernel=None):
return False

def remove_qual(ev):
return re.sub(r':(p?)[ku]+', lambda m: m.group(1), re.sub(r'/(p?)[ku]+', lambda m: '/' + m.group(1), ev))
def get_group(prefix, m):
if m.group(1):
return prefix + m.group(1)
return prefix

return re.sub(r':(p?)[ku]+', lambda m: get_group("", m), re.sub(r'/(p?)[ku]+', lambda m: get_group("/", m), ev))

def limited_overflow(evlist, num):
class GenericCounters:
Expand Down

0 comments on commit 0d79211

Please sign in to comment.