Skip to content

Commit

Permalink
Fix typing in puppet target
Browse files Browse the repository at this point in the history
  • Loading branch information
jschwartzentruber committed May 30, 2024
1 parent d280d88 commit ba9b7ea
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions grizzly/target/puppet_target.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from signal import SIGABRT, Signals
from tempfile import TemporaryDirectory, mkdtemp
from time import sleep, time
from typing import Dict, Optional, Set, cast
from typing import Any, Dict, Optional, Set, cast

try:
from signal import SIGUSR1 # pylint: disable=ungrouped-imports
Expand All @@ -24,6 +24,8 @@
from prefpicker import PrefPicker
from psutil import AccessDenied, NoSuchProcess, Process, process_iter, wait_procs

from sapphire import CertificateBundle

from ..common.report import Report
from ..common.utils import grz_tmp
from .target import Result, Target, TargetLaunchError, TargetLaunchTimeout
Expand Down Expand Up @@ -100,9 +102,9 @@ def __init__(
launch_timeout: int,
log_limit: int,
memory_limit: int,
**kwds,
**kwds: Dict[str, Any],
) -> None:
certs = kwds.pop("certs", None)
certs = cast(Optional[CertificateBundle], kwds.pop("certs", None))
# only pass certs to FFPuppet if certutil is available
# otherwise certs can't be used
if certs and not certutil_available(certutil_find(binary)):
Expand Down Expand Up @@ -133,7 +135,7 @@ def __init__(
# create Puppet object
self._puppet = FFPuppet(
debugger=self._debugger,
headless=kwds.pop("headless", None),
headless=cast(Optional[str], kwds.pop("headless", None)),
working_path=str(grz_tmp("target")),
)
if kwds:
Expand Down

0 comments on commit ba9b7ea

Please sign in to comment.