Skip to content

Commit

Permalink
ci: appeasing mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
JuanPedroGHM committed Aug 18, 2023
1 parent 803b60d commit 45ac4b5
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions perun/api/decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import functools
from typing import Optional

from perun import log
from perun.perun import Perun


Expand All @@ -14,18 +15,16 @@ def func_wrapper(*args, **kwargs):
# Get custom config and kwargs
region_id = region_name if region_name else func.__name__

perun = Perun()
perun = Perun() # type: ignore

log.info(f"Rank {perun.comm.Get_rank()}: Entering '{region_id}'")
perun.local_regions.addEvent(region_id)
perun.local_regions.addEvent(region_id) # type: ignore
func_result = func(*args, **kwargs)
perun.local_regions.addEvent(region_id)
perun.local_regions.addEvent(region_id) # type: ignore
log.info(f"Rank {perun.comm.Get_rank()}: Leaving '{region_id}'")

return func_result

return func_wrapper

return inner_function

from perun import log

0 comments on commit 45ac4b5

Please sign in to comment.