Skip to content

Commit

Permalink
Fix types
Browse files Browse the repository at this point in the history
[ci skip-build-wheels]
  • Loading branch information
gshuflin committed Oct 7, 2020
1 parent 346f0bf commit 2f98874
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/python/pants/bin/remote_pants_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import termios
import time
from contextlib import contextmanager
from typing import List, Mapping, cast
from typing import List, Mapping

import psutil

Expand Down Expand Up @@ -145,7 +145,7 @@ def signal_fn() -> bool:
with ExceptionSink.trapped_signals(pantsd_signal_handler), STTYSettings.preserved():
try:
output = rust_nailgun_client.execute(signal_fn, command, args, modified_env)
return cast(ExitCode, output)
return output

# NailgunConnectionException represents a failure connecting to pantsd, so we retry
# up to the retry limit.
Expand Down
8 changes: 7 additions & 1 deletion src/python/pants/engine/internals/native_engine.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Any
from typing import Any, Callable, Dict, List

# TODO: black and flake8 disagree about the content of this file:
# see https://github.com/psf/black/issues/1548
Expand Down Expand Up @@ -32,6 +32,12 @@ class PyGeneratorResponseGetMulti:
class PyNailgunServer:
def __init__(self, **kwargs: Any) -> None: ...

class PyNailgunClient:
def __init__(self, **kwargs: Any) -> None: ...
def execute(
self, signal_fn: Callable, command: str, args: List[str], env: Dict[str, str]
) -> int: ...

class PyRemotingOptions:
def __init__(self, **kwargs: Any) -> None: ...

Expand Down

0 comments on commit 2f98874

Please sign in to comment.