Skip to content

Commit

Permalink
Fix return type annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
LeonievonMann committed Dec 21, 2024
1 parent 628e286 commit 0b1cd8e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions varats/varats/experiments/vara/blame_server_experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@


class BlameServerSteps(actions.Compile): # type: ignore
""""Start blame server before and kill server after compilation."""
"""Start blame server before and kill server after compilation."""

NAME = "BlameServerSteps"
DESCRIPTION = "Start server before and kill server after compilation."
Expand All @@ -47,7 +47,7 @@ def __call__(self) -> actions.StepResult:
return steps

Check warning on line 47 in varats/varats/experiments/vara/blame_server_experiment.py

View workflow job for this annotation

GitHub Actions / pylint

[pylint] varats/varats/experiments/vara/blame_server_experiment.py#L47 <134>

'return' shadowed by the 'finally' clause. (return-in-finally)
Raw output
varats/varats/experiments/vara/blame_server_experiment.py:47:12: W0134: 'return' shadowed by the 'finally' clause. (return-in-finally)

Check warning on line 47 in varats/varats/experiments/vara/blame_server_experiment.py

View workflow job for this annotation

GitHub Actions / pylint

[pylint] varats/varats/experiments/vara/blame_server_experiment.py#L47 <150>

return statement in finally block may swallow exception (lost-exception)
Raw output
varats/varats/experiments/vara/blame_server_experiment.py:47:12: W0150: return statement in finally block may swallow exception (lost-exception)

@staticmethod
def find_open_port() -> int:
def find_open_port() -> tp.Any:
"""Finds and returns an available port on the local machine."""
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
s.bind(('', 0)) # Bind to a free port provided by the OS
Expand Down

0 comments on commit 0b1cd8e

Please sign in to comment.