Skip to content

Commit

Permalink
add type annotations
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitry Chigarev <[email protected]>
  • Loading branch information
dchigarev committed Apr 2, 2024
1 parent 7b3f90a commit d9b3f8b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modin/config/pubsub.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,14 +242,14 @@ class Parameter(object):
_once: DefaultDict[Any, list] = defaultdict(list)
_deprecation_descriptor: Optional[DeprecationDescriptor] = None

def __init__(self, value):
def __init__(self, value: Any):
self._previous_val = self.get()
self.put(value)

def __enter__(self, *args, **kwargs): # noqa: GL08
def __enter__(self) -> "Parameter": # noqa: GL08
return self

def __exit__(self, *args, **kwargs): # noqa: GL08
def __exit__(self, *args: tuple, **kwargs: dict) -> None: # noqa: GL08
self.put(self._previous_val)

@classmethod
Expand Down

0 comments on commit d9b3f8b

Please sign in to comment.