diff --git a/pyproject.toml b/pyproject.toml index 97f26b32f..bc0fe9843 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -75,8 +75,12 @@ source = ["drunc"] [tool.ruff.lint] ignore = [ "E501", # Don't enforce line lengths within a linting context + "D201", + "D202", + "D212" ] select = [ + "D", "E", # pycodestyle errors "F", # check for errors using PyFlakes "I", # best practices for import calls @@ -113,3 +117,18 @@ module = ["google.rpc.*"] [[tool.mypy.overrides]] ignore_missing_imports = true module = ["conffwk"] + +[[tool.mypy.overrides]] +ignore_missing_imports = true +module = [ + "click_shell", + "confmodel_dal", + "flask_restful", + "grpc_status", + "kafkaopmon.*", + "opmonlib.*", + "paramiko", + "pytz", + "sh", + "socks", +] diff --git a/src/drunc/apps/check_np0x_cluster.py b/src/drunc/apps/check_np0x_cluster.py index 57b58ac42..46dcaa43d 100644 --- a/src/drunc/apps/check_np0x_cluster.py +++ b/src/drunc/apps/check_np0x_cluster.py @@ -1,6 +1,7 @@ import os import subprocess from concurrent.futures import ThreadPoolExecutor, as_completed +from typing import NotRequired, TypedDict import paramiko from rich import box @@ -8,6 +9,29 @@ from rich.live import Live from rich.table import Table + +class HostData(TypedDict): + """Data dictionary tracking the status of a single cluster host.""" + + alias: str + is_pingable: bool | None + ssh_key: str + key_color: str + cpu_count: str + total_cores: str + cpu_usage: str + cpu_model: str + model_color: str + ram_total: str + ram_usage: str + nfs_ok: bool + uptime: str + details: NotRequired[str] + ssh_key_status: NotRequired[str] + ssh_key_color: NotRequired[str] + status: NotRequired[str] + + # List of NP0x cluster hosts NP0X_CLUSTER_HOSTS = sorted( [ @@ -48,7 +72,7 @@ STYLE_OFFLINE = "[bold white on #444444] OFFLINE [/]" # Base template for host tracking -DEFAULT_HOST_DATA = { +DEFAULT_HOST_DATA: HostData = { "alias": "", "is_pingable": None, # None: Waiting, True: Up, False: Down "ssh_key": "Pending", @@ -65,18 +89,18 @@ } -class TrackingAutoAddPolicy(paramiko.MissingHostKeyPolicy): +class TrackingAutoAddPolicy(paramiko.MissingHostKeyPolicy): # type: ignore[misc, no-any-unimported] """ Custom policy to track missing host keys and update the result dict accordingly. """ - def __init__(self, res_dict): + def __init__(self, res_dict: HostData) -> None: """ Initialize with a reference to the result dictionary to update key status. """ self.res_dict = res_dict - def missing_host_key(self, client, hostname, key): + def missing_host_key(self, client: object, hostname: str, key: object) -> None: """ When a host key is missing, update the result dictionary to indicate that the key is being added. @@ -86,7 +110,7 @@ def missing_host_key(self, client, hostname, key): self.res_dict["key_color"] = "bold yellow" -def load_ssh_config() -> paramiko.SSHConfig: +def load_ssh_config() -> paramiko.SSHConfig: # type: ignore[no-any-unimported] """ Load the user's SSH configuration from ~/.ssh/config using Paramiko's SSHConfig class. @@ -146,7 +170,7 @@ def ping_host(hostname: str) -> bool: ) -def get_host_metrics(host_alias: str, ssh_config: paramiko.SSHConfig) -> dict: +def get_host_metrics(host_alias: str, ssh_config: paramiko.SSHConfig) -> HostData: # type: ignore[no-any-unimported] """ For a given host alias, perform the following checks: - Ping the host to determine if it's online. @@ -326,7 +350,7 @@ def get_host_metrics(host_alias: str, ssh_config: paramiko.SSHConfig) -> dict: return result -def generate_table(results_map: dict[str, str]) -> Table: +def generate_table(results_map: dict[str, HostData]) -> Table: """ Generate a Rich Table object to display the status of the NP0x cluster hosts. @@ -372,8 +396,8 @@ def generate_table(results_map: dict[str, str]) -> Table: # Iterate through the results_map and add a row to the table for each host. for host in NP0X_CLUSTER_HOSTS: # Retrieve the result dictionary for the current host - r = results_map.get(host) - hostname = r["alias"] if r else host + r = results_map.get(host, DEFAULT_HOST_DATA) + hostname = r["alias"] if r["alias"] else host # Host is Pingable if r["is_pingable"] is True: @@ -415,7 +439,7 @@ def generate_table(results_map: dict[str, str]) -> Table: return table -def main(): +def main() -> None: """ Main function to execute the NP0x cluster status check and display results in a live-updating table. diff --git a/src/drunc/apps/check_np0x_hw_status.py b/src/drunc/apps/check_np0x_hw_status.py index 473730314..44a823fdd 100644 --- a/src/drunc/apps/check_np0x_hw_status.py +++ b/src/drunc/apps/check_np0x_hw_status.py @@ -11,6 +11,7 @@ import sys from concurrent.futures import ThreadPoolExecutor, TimeoutError, as_completed from datetime import datetime +from typing import TypedDict import click import pytz @@ -21,8 +22,15 @@ from rich.table import Table +class HardwareStatus(TypedDict): + """Status dictionary returned by check_hardware.""" + + online: bool + fembs: list[bool] + + # --- DYNAMIC PATH SETUP --- -def setup_wib_path(): +def setup_wib_path() -> str | None: """ Sets up the path to the local copy of the dune-wib-firmware repository if it exists. @@ -67,8 +75,8 @@ def setup_wib_path(): if WIB_FW_SW_IFACE_PATH: try: - import wib_pb2 as wibpb - from wib import WIB + import wib_pb2 as wibpb # type: ignore[import-not-found, no-redef] + from wib import WIB # type: ignore[import-not-found, no-redef] WIB_LIB_AVAILABLE = True except (ImportError, ModuleNotFoundError): @@ -156,7 +164,7 @@ def setup_wib_path(): } -def check_hardware(ip: str) -> dict: +def check_hardware(ip: str) -> HardwareStatus: """ Checks the hardware status of a given IP address by first pinging it to determine if it is online, and if it is online, attempting to query its FEMB power status using @@ -180,7 +188,7 @@ def check_hardware(ip: str) -> dict: errors (e.g. timeouts, subprocess errors, gRPC errors, etc.). """ # Default state is 'In Progress' (None) - final_status = {"online": False, "fembs": [False] * 4} + final_status: HardwareStatus = {"online": False, "fembs": [False] * 4} try: # 1. Ping @@ -193,7 +201,7 @@ def check_hardware(ip: str) -> dict: final_status["online"] = True # 2. Protocol Check - if WIB_LIB_AVAILABLE: + if WIB is not None and wibpb is not None: try: wib_inst = WIB(ip) req = wibpb.GetFEMBStatus() @@ -214,7 +222,9 @@ def check_hardware(ip: str) -> dict: return final_status -def make_wib_table(category: str, wibs: dict[str, str], results_map: dict) -> Table: +def make_wib_table( + category: str, wibs: dict[str, str], results_map: dict[str, HardwareStatus | None] +) -> Table: """ Creates a Rich Table for a given category of WIBs, showing their online status and FEMB power status. @@ -281,7 +291,7 @@ def make_wib_table(category: str, wibs: dict[str, str], results_map: dict) -> Ta return table -def generate_display(results_map: dict) -> Table: +def generate_display(results_map: dict[str, HardwareStatus | None]) -> Table: """ Generates the overall display grid for the current results. @@ -326,7 +336,7 @@ def generate_display(results_map: dict) -> Table: "Each WIB is pinged first, then queried for FEMB status when reachable." ), ) -def main(): +def main() -> None: """ Prints the power status of the hardware defined in WIB_DATA. @@ -355,7 +365,7 @@ def main(): ] # Initialize results map as empty/None for all IPs to force dots initially - results = {ip: None for ip in all_ips} + results: dict[str, HardwareStatus | None] = {ip: None for ip in all_ips} # Define a ThreadPoolExecutor to check hardware in parallel, and a mapping of # futures to IPs diff --git a/src/drunc/apps/controller.py b/src/drunc/apps/controller.py index 67b1c334a..54059b834 100644 --- a/src/drunc/apps/controller.py +++ b/src/drunc/apps/controller.py @@ -2,7 +2,7 @@ from drunc.utils.utils import get_logger, get_root_logger -def main(): +def main() -> None: try: controller_cli() except Exception as e: diff --git a/src/drunc/apps/fake_daqapp_rest.py b/src/drunc/apps/fake_daqapp_rest.py index 7a87dc7fc..19eec0b20 100644 --- a/src/drunc/apps/fake_daqapp_rest.py +++ b/src/drunc/apps/fake_daqapp_rest.py @@ -6,11 +6,12 @@ import random import threading import time +from typing import NotRequired, TypedDict from urllib.parse import urlparse import conffwk import requests -from flask import Flask, Response, request +from flask import Flask, request from flask_restful import Api, Resource from drunc.connectivity_service.client import ConnectivityServiceClient @@ -21,6 +22,27 @@ resolve_localhost_and_127_ip_to_network_ip, ) +# TypedDicts for execute_command request structure +_CmdData = TypedDict( + "_CmdData", + { + "execution-time": int, + "seg_fault": int, + "throw": bool, + }, + total=False, +) + + +class CommandRequest(TypedDict): + """Expected structure for incoming DAQ application command requests.""" + + entry_state: str + exit_state: str + id: str + data: NotRequired[_CmdData] + + __version__ = "1.0.0" get_root_logger("info") log = get_logger("fake_daqapp_rest", rich_handler=True) @@ -34,8 +56,8 @@ def __init__(self, app_name: str): self.log = get_logger("fake_daqapp_rest.AppState") def send_response_to_response_listener( - self, address: str, txt: str, success: bool = True, data: dict = {} - ): + self, address: str, txt: str, success: bool = True, data: dict[str, object] = {} + ) -> None: data_to_send = { "success": success, "result": txt, @@ -57,8 +79,12 @@ def send_response_to_response_listener( self.log.exception(e) def execute_command( - self, req_data, answer_port, answer_host, remote_host - ) -> Response: + self, + req_data: CommandRequest, + answer_port: str, + answer_host: str | None, + remote_host: str | None, + ) -> None: # The following block simulates a failure of the app while executing a stateful # command. Thisserves uniquely to test the robustness of the Run Control when an # app exits upon running an applciation, and should not be used for any other @@ -77,7 +103,7 @@ def execute_command( entry_state = req_data["entry_state"] exit_state = req_data["exit_state"] command_id = req_data["id"] - data = req_data.get("data", {}) + data: _CmdData = req_data.get("data", {}) if self.executing_command: response_txt = "Already executing a command!!" @@ -121,9 +147,7 @@ def execute_command( if data.get("throw"): time.sleep(worries) - what = ( - "This is an eRrOr, YoU hAvE bEeN vErY nAuGhTy (aka task failed successfully)", - ) + what = "This is an eRrOr, YoU hAvE bEeN vErY nAuGhTy (aka task failed successfully)" self.log.info(what) self.send_response_to_response_listener( success=False, @@ -155,13 +179,13 @@ def execute_command( """ -class AppCommand(Resource): +class AppCommand(Resource): # type: ignore[misc, no-any-unimported] @classmethod - def pass_daq_app(cls, daq_app): + def pass_daq_app(cls, daq_app: "AppState") -> "type[AppCommand]": cls.daq_app = daq_app return cls - def post(self): + def post(self) -> tuple[str, int]: global app_state try: @@ -185,7 +209,12 @@ def post(self): return "Command received\n", 202 -def update_connectivity_service(name, connectivity_service, interval, url): +def update_connectivity_service( + name: str, + connectivity_service: ConnectivityServiceClient, + interval: int | float, + url: object, +) -> None: while True: connectivity_service.publish( name + "_control", @@ -195,15 +224,15 @@ def update_connectivity_service(name, connectivity_service, interval, url): time.sleep(interval) -def index(): +def index() -> str: return f"Fake DAQ app v{__version__}" -def get_address_for_conn_srv(hostname): +def get_address_for_conn_srv(hostname: str) -> str: return f"rest://{hostname}:{get_new_port()}" -def main(): +def main() -> None: # The following block simulates a failure during the initialization of the app. This # serves uniquely to test the robustness of the Run Control when an app fails to # initialize, and should not be used for any other purpose. The environment variable @@ -278,7 +307,8 @@ def main(): log.debug(f"Initializing fake_daq_application with address {url}") if url.port == 0: - url = get_address_for_conn_srv(url.hostname) + hostname = url.hostname or "localhost" + url = urlparse(get_address_for_conn_srv(hostname)) log.info(f"Communication address is {url}") interval = 2 @@ -307,7 +337,7 @@ def main(): api.add_resource(DAQAppCMD, "/command", methods=["POST"]) app.add_url_rule("/", "index", index) - url = urlparse(url) + url = urlparse(url) if isinstance(url, str) else url flask_url = url.geturl().replace("rest://", "http://") log.info(f"Starting FakeDAQ app on {flask_url}") diff --git a/src/drunc/apps/pm.py b/src/drunc/apps/pm.py index 6c8509c6d..590809d75 100644 --- a/src/drunc/apps/pm.py +++ b/src/drunc/apps/pm.py @@ -2,7 +2,7 @@ from drunc.utils.utils import get_logger, get_root_logger -def main(): +def main() -> None: try: process_manager_cli() except Exception as e: diff --git a/src/drunc/apps/pm_shell.py b/src/drunc/apps/pm_shell.py index eb74ad0c5..926a7c14d 100644 --- a/src/drunc/apps/pm_shell.py +++ b/src/drunc/apps/pm_shell.py @@ -3,7 +3,7 @@ from drunc.utils.utils import get_logger, get_root_logger -def main(): +def main() -> None: context = ProcessManagerContext() try: process_manager_shell(obj=context) diff --git a/src/drunc/apps/session_manager.py b/src/drunc/apps/session_manager.py index 47cc0a12d..c7970cc9e 100644 --- a/src/drunc/apps/session_manager.py +++ b/src/drunc/apps/session_manager.py @@ -2,7 +2,7 @@ from drunc.utils.utils import get_logger, get_root_logger -def main(): +def main() -> None: try: session_manager_cli() except Exception as e: diff --git a/src/drunc/apps/ssh_doctor.py b/src/drunc/apps/ssh_doctor.py index 65c60b7d1..966cc6b00 100755 --- a/src/drunc/apps/ssh_doctor.py +++ b/src/drunc/apps/ssh_doctor.py @@ -39,7 +39,7 @@ def test_host_connection(host: str, test_auth: str) -> bool: bool: True if the SSH connection is successful, False otherwise. """ - ssh_manager = SSHProcessLifetimeManagerParamiko(disable_host_key_check=True) + ssh_manager = SSHProcessLifetimeManagerParamiko(disable_host_key_check=True) # type: ignore[abstract] try: ssh_manager.validate_host_connection(host=host, auth_method=test_auth) @@ -125,7 +125,7 @@ def print_results(results: dict[str, dict[str, bool]]) -> None: default="INFO", help="Set the log level", ) -def main(log_level: str): +def main(log_level: str) -> None: """ Validate the ability to SSH onto all of the hosts required by the configuration session applications.\n\n diff --git a/src/drunc/apps/ssh_validator.py b/src/drunc/apps/ssh_validator.py index 42bbe0e45..8033ff54c 100644 --- a/src/drunc/apps/ssh_validator.py +++ b/src/drunc/apps/ssh_validator.py @@ -7,11 +7,13 @@ from sh import Command from drunc.process_manager.oks_parser import collect_apps -from drunc.process_manager.ssh_process_manager_paramiko_client import on_parent_exit +from drunc.process_manager.utils import on_parent_exit from drunc.utils.utils import get_logger -def validate_ssh_connection(configuration: str, session_name: str, log_level: str): +def validate_ssh_connection( + configuration: str, session_name: str, log_level: str +) -> None: log = get_logger("validate_ssh_connection", rich_handler=True) db = conffwk.Configuration(f"oksconflibs:{configuration}") diff --git a/src/drunc/apps/unified_shell.py b/src/drunc/apps/unified_shell.py index 1521ce3dd..f3b0b3b65 100644 --- a/src/drunc/apps/unified_shell.py +++ b/src/drunc/apps/unified_shell.py @@ -3,7 +3,7 @@ from drunc.utils.utils import get_logger, get_root_logger -def main(): +def main() -> None: context = UnifiedShellContext() try: diff --git a/src/drunc/controller/interface/commands.py b/src/drunc/controller/interface/commands.py index 26f60972b..b50b866d0 100644 --- a/src/drunc/controller/interface/commands.py +++ b/src/drunc/controller/interface/commands.py @@ -151,7 +151,7 @@ def connect(obj: ControllerContext, controller_address: str, force: bool) -> Non @click.command("disconnect") @click.option("-f", "--force", is_flag=True, help="Confirm the disconnect") @click.pass_obj -def disconnect(obj: ControllerContext, force: bool): +def disconnect(obj: ControllerContext, force: bool) -> None: if not obj.has_driver("controller"): log.info("You are not connected to any controller.") return @@ -251,7 +251,7 @@ def who_am_i(obj: ControllerContext) -> None: @click.command("echo") @click.argument("text", required=False) @click.pass_obj -def echo(obj, text: str | None) -> None: +def echo(obj: ControllerContext, text: str | None) -> None: log_echo.info(text or "") diff --git a/src/drunc/controller/interface/context.py b/src/drunc/controller/interface/context.py index 3468edce6..c3bbc7225 100644 --- a/src/drunc/controller/interface/context.py +++ b/src/drunc/controller/interface/context.py @@ -1,4 +1,4 @@ -from collections.abc import Mapping +from collections.abc import MutableMapping from druncschema.token_pb2 import Token @@ -13,18 +13,22 @@ class ControllerContext(ShellContext): # boilerplatefest shell_id = "controller_shell" - def __init__(self): + def __init__(self) -> None: self.status_receiver = None self.took_control = False super(ControllerContext, self).__init__() - def reset(self, address: str = None): + def reset(self, *args: object, **kwargs: object) -> None: + address_raw = kwargs.get("address") + if address_raw is None and args: + address_raw = args[0] + address = str(address_raw) if address_raw is not None else "" self.address = resolve_localhost_to_hostname(address) super(ControllerContext, self)._reset( name="controller_context", token_args={}, driver_args={} ) - def create_drivers(self, **kwargs) -> Mapping[str, object]: + def create_drivers(self, **kwargs: object) -> MutableMapping[str, object]: if not self.address: return {} return {"controller": ControllerDriver(self.address, self._token)} @@ -32,6 +36,10 @@ def create_drivers(self, **kwargs) -> Mapping[str, object]: def create_token(self, **kwargs) -> Token: return create_dummy_token_from_uname() - def terminate(self): + def set_controller_driver(self, address_controller: str) -> None: + self.address = resolve_localhost_to_hostname(address_controller) + self._drivers["controller"] = ControllerDriver(self.address, self._token) + + def terminate(self) -> None: if self.status_receiver: self.status_receiver.stop() diff --git a/src/drunc/controller/interface/shell_utils.py b/src/drunc/controller/interface/shell_utils.py index ec5529baa..e855ef1c4 100644 --- a/src/drunc/controller/interface/shell_utils.py +++ b/src/drunc/controller/interface/shell_utils.py @@ -9,6 +9,7 @@ from collections.abc import Sequence from concurrent.futures import ThreadPoolExecutor from dataclasses import dataclass +from typing import Protocol, TypeAlias from urllib.parse import urlparse import click @@ -58,6 +59,13 @@ class StatusDescriptionPair: description: DescribeResponse | None = None +class FSMExecutionResponseLike(Protocol): + name: str + flag: int + fsm_flag: int + children: Sequence["FSMExecutionResponseLike"] + + def match_children( statuses: Sequence[StatusResponse], descriptions: Sequence[DescribeResponse] ) -> dict[str, StatusDescriptionPair]: @@ -76,7 +84,7 @@ def get_status_table( describe_response: DescribeResponse, display_host_overrides: dict[str, str] | None = None, show_ip_address: bool = False, -): +) -> Table | Group: status = status_response.status description = describe_response.description @@ -102,7 +110,7 @@ def add_status_to_table( status_response: StatusResponse, describe_response: DescribeResponse, prefix: str, - ): + ) -> None: status = status_response.status description = describe_response.description if status is None or description is None: @@ -183,7 +191,7 @@ def make_uri(host: str) -> str: add_status_to_table(t, status_response, describe_response, "") - def add_runinfo_to_table(table: Table, status: Status): + def add_runinfo_to_table(table: Table, status: Status) -> None: table.add_row("Run number", str(status.run_info.run_number)) table.add_row("Run type", status.run_info.run_type) table.add_row( @@ -217,12 +225,12 @@ def add_runinfo_to_table(table: Table, status: Status): def render_status_table( - ctx: ControllerContext, + ctx: ControllerContext | UnifiedShellContext, target: str = "", execute_along_path: bool = True, execute_on_all_subsequent_children_in_path: bool = True, show_ip_address: bool = False, -): +) -> Table | Group: statuses = ctx.get_driver("controller").status( target=target, execute_along_path=execute_along_path, @@ -243,7 +251,13 @@ def render_status_table( class StatusTableUpdater(Progress): - def __init__(self, ctx, refresh_per_second=2, *args, **kwargs) -> None: + def __init__( + self, + ctx: ControllerContext | UnifiedShellContext, + refresh_per_second: float = 2, + *args: object, + **kwargs: object, + ) -> None: self.ctx = ctx self.update_table() @@ -256,7 +270,7 @@ def __init__(self, ctx, refresh_per_second=2, *args, **kwargs) -> None: super().__init__(*args, refresh_per_second=refresh_per_second, **kwargs) - def update_table(self): + def update_table(self) -> None: self.table = render_status_table(self.ctx) def get_renderable(self) -> ConsoleRenderable | RichCast | str: @@ -264,8 +278,10 @@ def get_renderable(self) -> ConsoleRenderable | RichCast | str: return renderable -def controller_cleanup_wrapper(ctx): - def controller_cleanup(): +def controller_cleanup_wrapper( + ctx: ControllerContext | UnifiedShellContext, +): + def controller_cleanup() -> None: log = logging.getLogger("controller.shell_utils") dead = False who = "" @@ -296,7 +312,9 @@ def controller_cleanup(): return controller_cleanup -def controller_setup(ctx, controller_address): +def controller_setup( + ctx: ControllerContext | UnifiedShellContext, controller_address: str +) -> Description: log = logging.getLogger("controller.shell_utils") if not hasattr(ctx, "took_control"): raise DruncSetupException( @@ -389,7 +407,9 @@ def controller_setup(ctx, controller_address): return desc -def search_fsm_command(command_name: str, command_list: list[FSMCommand]): +def search_fsm_command( + command_name: str, command_list: list[FSMCommand] +) -> FSMCommand | None: for command in command_list: if command_name == command.name: return command @@ -432,13 +452,17 @@ def __init__(self, arguments_and_values): super(UnhandledArguments, self).__init__(message) -def format_bool(b, format=["dark_green", "red"], false_is_good=False): +def format_bool( + b: bool, + format: Sequence[str] = ("dark_green", "red"), + false_is_good: bool = False, +) -> str: index_true = 0 if not false_is_good else 1 index_false = 1 if not false_is_good else 0 return f"[{format[index_true]}]Yes[/]" if b else f"[{format[index_false]}]No[/]" -def tree_prefix(i, n): +def tree_prefix(i: int, n: int) -> str: first_one = "└── " first_many = "├── " next = "├── " @@ -456,7 +480,7 @@ def tree_prefix(i, n): def validate_and_format_fsm_arguments( arguments: dict[str, int | bool | str | float | None] | None, command_arguments: list[Argument], -) -> dict[str, int | bool | str | float | None]: +) -> dict[str, any_pb2.Any]: """ Validates and formats the arguments passed to an FSM command based on the command's argument descriptions. @@ -477,7 +501,7 @@ def validate_and_format_fsm_arguments( # Define the output dict that will be sent to the controller, with argument names # and their formatted values - out_dict: dict[str, any_pb2] = {} + out_dict: dict[str, any_pb2.Any] = {} # Strip out any arguments that are None, as they are considered not passed, and will # be set to default values if they exist, or raise an error if they are mandatory @@ -491,7 +515,6 @@ def validate_and_format_fsm_arguments( for argument_desc in command_arguments: #  type: Argument aname: str = argument_desc.name atype: str = Argument.Type.Name(argument_desc.type) - adefa: str | int | float | bool | None = argument_desc.default_value # Check for duplicate arguments if aname in out_dict: @@ -507,7 +530,8 @@ def validate_and_format_fsm_arguments( # If the argument is not passed, and it has a default value, use the default value value: str | int | float | bool | None = arguments.get(aname) if value is None: - out_dict[aname] = adefa + if argument_desc.HasField("default_value"): + out_dict[aname] = argument_desc.default_value continue # Convert the argument value to the appropriate type based on the argument @@ -544,7 +568,9 @@ def validate_and_format_fsm_arguments( return out_dict -def collect_not_ready(response, found=None): +def collect_not_ready( + response: StatusResponse, found: list[str] | None = None +) -> list[str]: if found is None: found = [] @@ -627,7 +653,7 @@ def run_one_fsm_command( else: class DummyCommand: - pass + arguments: list[Argument] command_desc = DummyCommand() command_desc.arguments = [] @@ -708,7 +734,9 @@ class DummyCommand: t.add_column("Command execution") t.add_column("FSM transition") - def bool_to_success(flag_message, message_type): + def bool_to_success( + flag_message: int, message_type: type[ResponseFlag] | type[FSMResponseFlag] + ) -> str: flag = message_type.Name(flag_message).replace("_", " ").title() success = False @@ -725,7 +753,9 @@ def bool_to_success(flag_message, message_type): return f"[dark_green]{flag}[/]" if success else f"[red]{flag}[/]" - def add_to_table(table, response, prefix=""): + def add_to_table( + table: Table, response: FSMExecutionResponseLike, prefix: str = "" + ) -> None: executed_command = response.flag == ResponseFlag.EXECUTED_SUCCESSFULLY table.add_row( @@ -764,7 +794,7 @@ def generate_fsm_command(ctx, transition: FSMCommandDescription, controller_name """ # Construct the partial command executing the defined FSM command with click options - cmd: functools.partial = functools.partial( + cmd = functools.partial( run_one_fsm_command, controller_name=controller_name, transition_name=transition.name, @@ -778,7 +808,8 @@ def generate_fsm_command(ctx, transition: FSMCommandDescription, controller_name )(cmd) # Define the mapping of gRPC argument types to click types - type_map: dict[int, str | int | float | bool] = { + ClickValueType: TypeAlias = type[str] | type[int] | type[float] | type[bool] + type_map: dict[int, ClickValueType] = { Argument.Type.STRING: str, Argument.Type.INT: int, Argument.Type.FLOAT: float, @@ -787,7 +818,10 @@ def generate_fsm_command(ctx, transition: FSMCommandDescription, controller_name # Define the mapping of gRPC argument types to their corresponding protobuf message # types for default value unpacking - msg_map: dict(any_pb2) = { + ProtobufScalarMsgType: TypeAlias = ( + type[string_msg] | type[int_msg] | type[float_msg] | type[bool_msg] + ) + msg_map: dict[ClickValueType, ProtobufScalarMsgType] = { str: string_msg, int: int_msg, float: float_msg, @@ -799,7 +833,7 @@ def generate_fsm_command(ctx, transition: FSMCommandDescription, controller_name for argument in transition.arguments: # type: Argument # Map the gRPC argument type to a click type, raise an exception if the type is # unhandled - atype: Argument.Type.V = type_map.get(argument.type) + atype = type_map.get(argument.type) if not atype: raise Exception(f"Unhandled argument type '{argument.type}'") diff --git a/src/drunc/process_manager/interface/context.py b/src/drunc/process_manager/interface/context.py index 24c0ff9df..d3ada3428 100644 --- a/src/drunc/process_manager/interface/context.py +++ b/src/drunc/process_manager/interface/context.py @@ -13,11 +13,15 @@ class ProcessManagerContext(ShellContext): # boilerplatefest shell_id = "process_manager_shell" - def __init__(self, *args, **kwargs): + def __init__(self, *args: object, **kwargs: object) -> None: self.status_receiver = None super(ProcessManagerContext, self).__init__(*args, **kwargs) - def reset(self, address: str = "", **kwargs): + def reset(self, *args: object, **kwargs: object) -> None: + address_raw = kwargs.get("address") + if address_raw is None and args: + address_raw = args[0] + address = str(address_raw) if address_raw is not None else "" self.address = resolve_localhost_to_hostname(address) super(ProcessManagerContext, self)._reset( name="process_manager_context", @@ -25,7 +29,7 @@ def reset(self, address: str = "", **kwargs): driver_args={}, ) - def create_drivers(self, **kwargs) -> MutableMapping[str, object]: + def create_drivers(self, **kwargs: object) -> MutableMapping[str, object]: if not self.address: return {} return { @@ -38,6 +42,6 @@ def create_drivers(self, **kwargs) -> MutableMapping[str, object]: def create_token(self, **kwargs) -> Token: return create_dummy_token_from_uname() - def terminate(self): + def terminate(self) -> None: if self.status_receiver: self.status_receiver.stop() diff --git a/src/drunc/process_manager/interface/process_manager.py b/src/drunc/process_manager/interface/process_manager.py index eb2fa4e13..79e3008b4 100644 --- a/src/drunc/process_manager/interface/process_manager.py +++ b/src/drunc/process_manager/interface/process_manager.py @@ -4,6 +4,10 @@ import signal import sys import types +from collections.abc import Callable +from multiprocessing.sharedctypes import Synchronized +from multiprocessing.synchronize import Event +from typing import cast import click import grpc @@ -31,7 +35,7 @@ resolve_localhost_and_127_ip_to_network_ip, ) -_cleanup_coroutines = [] +_cleanup_coroutines: list[Callable[[], None]] = [] def run_pm( @@ -39,10 +43,10 @@ def run_pm( pm_address: str, log_level: str, override_logs: bool, - log_path: str = None, - ready_event: bool = None, - signal_handler: bool = None, - generated_port: bool = None, + log_path: str | None = None, + ready_event: Event | None = None, + signal_handler: Callable[[], None] | None = None, + generated_port: Synchronized[int] | None = None, ) -> None: appName = "process_manager" log = get_logger(logger_name=appName, rich_handler=True) @@ -63,16 +67,22 @@ def run_pm( path_or_url = conf_path.split(":")[1] if conf_type == ConfTypes.JsonFileName: - pmch = ProcessManagerConfHandler.from_json(path=path_or_url, log_path=log_path) + pmch = ProcessManagerConfHandler.from_json( + path=path_or_url, + log_path=log_path or "", + ) else: - pmch = ProcessManagerConfHandler.from_pyobject(data=path_or_url) + pmch = cast( + ProcessManagerConfHandler, + ProcessManagerConfHandler.from_pyobject(data=path_or_url), + ) log_path = get_log_path( user=getpass.getuser(), session_name=getattr(pmch, "pm_type", pmch.type).name, application_name=appName, override_logs=override_logs, - app_log_path=log_path, + app_log_path=log_path or "", ) # Logger has been added to process_manager, so everything will be logged @@ -133,7 +143,7 @@ def server_shutdown() -> None: server = None return - def handle_sigterm(signum: int, frame: types.FrameType) -> None: + def handle_sigterm(signum: int, frame: types.FrameType | None) -> None: """ Handle the SIGTERM signal to gracefully shut down the server. diff --git a/src/drunc/unified_shell/commands.py b/src/drunc/unified_shell/commands.py index e41b42a15..3d2e174a6 100644 --- a/src/drunc/unified_shell/commands.py +++ b/src/drunc/unified_shell/commands.py @@ -1,6 +1,7 @@ import getpass import sys from functools import update_wrapper +from typing import Callable, ParamSpec, TypeVar, cast import click from druncschema.process_manager_pb2 import ProcessInstance, ProcessQuery @@ -20,10 +21,13 @@ restart_impl, ) from drunc.process_manager.interface.context import ProcessManagerContext -from drunc.unified_shell.context import UnifiedShellMode +from drunc.unified_shell.context import UnifiedShellContext, UnifiedShellMode from drunc.utils.shell_utils import InterruptedCommand, log_pm_cmd from drunc.utils.utils import get_logger +P = ParamSpec("P") +R = TypeVar("R") + @click.command("boot") @click.option( @@ -46,10 +50,10 @@ ) @click.pass_obj def boot( - obj: ProcessManagerContext, + obj: UnifiedShellContext, override_logs: bool | None, - controller_log_level: bool | None, - sleep_between_app_boot: int | float = 0, + controller_log_level: str | None, + sleep_between_app_boot: float = 0, ) -> None: log = get_logger("unified_shell.boot") log_pm_cmd(obj) @@ -84,8 +88,11 @@ def boot( override_logs=override_logs_boot, sleep_between_app_boot=sleep_between_app_boot, ) - expected_booted_processes = sum(1 for _ in results) + if results is None: + log.error("Boot request did not return any results.") + return for result in results: + expected_booted_processes += 1 log.critical( f"Booting process: {result.values[0].process_description.metadata.name}" ) @@ -149,7 +156,7 @@ def boot( @click.command("terminate") @click.pass_obj @click.pass_context -def terminate(ctx, obj): +def terminate(ctx: click.core.Context, obj: UnifiedShellContext) -> None: """ Execute the process manager terminate command, but only do this for the current session @@ -166,64 +173,71 @@ def terminate(ctx, obj): obj.delete_driver("controller") -def session_injector(f): +def session_injector(f: Callable[P, R]) -> Callable[P, R]: @click.pass_context - def wrapper(ctx, *args, **kwargs): + def wrapper(ctx: click.core.Context, *args: P.args, **kwargs: P.kwargs) -> R: kwargs["session"] = ctx.obj.session_name return ctx.invoke(f, *args, **kwargs) - return update_wrapper(wrapper, f) + return cast(Callable[P, R], update_wrapper(wrapper, f)) @click.command("ps") @session_injector @add_query_options_no_session(at_least_one=True) @ps_decorators -def ps(obj, query, long_format, width): +def ps( + obj: UnifiedShellContext, query: ProcessQuery, long_format: bool, width: int +) -> None: log_pm_cmd(obj) - return ps_impl(obj, query, long_format, width) + ps_impl(cast(ProcessManagerContext, obj), query, long_format, width) @click.command("logs") @session_injector @add_query_options_no_session(at_least_one=True) @logs_decorators -def logs(obj, how_far, grep, query): +def logs( + obj: UnifiedShellContext, + how_far: int, + grep: str | None, + query: ProcessQuery, +) -> None: log_pm_cmd(obj) - return logs_impl(obj, how_far, grep, query) + logs_impl(cast(ProcessManagerContext, obj), how_far, grep or "", query) @click.command("kill") @session_injector @add_query_options_no_session(at_least_one=True) @kill_decorators -def kill(obj, query, width): +def kill(obj: UnifiedShellContext, query: ProcessQuery, width: int) -> None: log_pm_cmd(obj) - return kill_impl(obj, query, width) + kill_impl(cast(ProcessManagerContext, obj), query, width) @click.command("flush") @session_injector @add_query_options_no_session(at_least_one=True) @flush_decorators -def flush(obj, query, width): +def flush(obj: UnifiedShellContext, query: ProcessQuery, width: int) -> None: log_pm_cmd(obj) - return flush_impl(obj, query, width) + flush_impl(cast(ProcessManagerContext, obj), query, width) @click.command("restart") @session_injector @add_query_options_no_session(at_least_one=True) @click.pass_obj -def restart(obj, query): +def restart(obj: UnifiedShellContext, query: ProcessQuery) -> None: log_pm_cmd(obj) - return restart_impl(obj, query) + restart_impl(cast(ProcessManagerContext, obj), query) @click.command("start-shell") @click.pass_obj @click.pass_context -def start_shell(ctx, obj): +def start_shell(ctx: click.core.Context, obj: UnifiedShellContext) -> None: """ Start an interactive shell session. diff --git a/src/drunc/unified_shell/context.py b/src/drunc/unified_shell/context.py index 1e28ed084..8d279bbb0 100644 --- a/src/drunc/unified_shell/context.py +++ b/src/drunc/unified_shell/context.py @@ -1,5 +1,6 @@ -from collections.abc import Mapping +from collections.abc import MutableMapping from enum import Enum +from multiprocessing.context import Process import grpc from druncschema.process_manager_pb2 import ProcessQuery @@ -19,12 +20,12 @@ class UnifiedShellMode(Enum): class UnifiedShellContext(ShellContext): # boilerplatefest shell_id = "unified_shell" - def __init__(self): + def __init__(self) -> None: self.log = None self.status_receiver_pm = None self.status_receiver_controller = None self.took_control = False - self.pm_process = None + self.pm_process: Process | None = None self.address_pm = "" self.address_controller = "" self.configuration_file = "" @@ -32,15 +33,19 @@ def __init__(self): self.session_name = "" self.override_logs = True self.running_mode = UnifiedShellMode.INTERACTIVE - self.batch_commands: list(str) = [] + self.batch_commands: list[str] = [] super(UnifiedShellContext, self).__init__() - def reset(self, address_pm: str = ""): + def reset(self, *args: object, **kwargs: object) -> None: + address_pm_raw = kwargs.get("address_pm") + if address_pm_raw is None and args: + address_pm_raw = args[0] + address_pm = str(address_pm_raw) if address_pm_raw is not None else "" self.address_pm = resolve_localhost_to_hostname(address_pm) super(UnifiedShellContext, self)._reset(name="unified_shell") - def create_drivers(self, **kwargs) -> Mapping[str, object]: - ret = {} + def create_drivers(self, **kwargs: object) -> MutableMapping[str, object]: + ret: MutableMapping[str, object] = {} if self.address_pm != "": from drunc.process_manager.process_manager_driver import ( ProcessManagerDriver, @@ -54,17 +59,20 @@ def create_drivers(self, **kwargs) -> Mapping[str, object]: from drunc.controller.controller_driver import ControllerDriver ret["controller"] = ControllerDriver( - self.address, + self.address_controller, self._token, ) return ret - def set_controller_driver(self, address_controller, **kwargs) -> None: - self.address_controller = address_controller + def set_controller_driver( + self, address_controller: str | None, **kwargs: object + ) -> None: + self.address_controller = address_controller or "" from drunc.controller.controller_driver import ControllerDriver if address_controller is None: - del self._drivers["controller"] + if "controller" in self._drivers: + del self._drivers["controller"] return self._drivers["controller"] = ControllerDriver( @@ -72,7 +80,7 @@ def set_controller_driver(self, address_controller, **kwargs) -> None: self._token, ) - def create_token(self, **kwargs) -> Token: + def create_token(self, **kwargs: object) -> Token: from drunc.utils.shell_utils import create_dummy_token_from_uname token = create_dummy_token_from_uname() diff --git a/src/drunc/unified_shell/mypy_out.md b/src/drunc/unified_shell/mypy_out.md new file mode 100644 index 000000000..516d02d55 --- /dev/null +++ b/src/drunc/unified_shell/mypy_out.md @@ -0,0 +1,811 @@ +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/grpc_settings.py:6: error: Need type annotation for "MANAGER_SERVER_GRPC_CONFIG" (hint: "MANAGER_SERVER_GRPC_CONFIG: list[] = ...") [var-annotated] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/grpc_settings.py:7: error: Need type annotation for "MANAGER_CLIENT_GRPC_CONFIG" (hint: "MANAGER_CLIENT_GRPC_CONFIG: list[] = ...") [var-annotated] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/grpc_settings.py:8: error: Need type annotation for "CONTROLLER_SERVER_GRPC_CONFIG" (hint: "CONTROLLER_SERVER_GRPC_CONFIG: list[] = ...") [var-annotated] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/grpc_settings.py:9: error: Need type annotation for "CONTROLLER_CLIENT_GRPC_CONFIG" (hint: "CONTROLLER_CLIENT_GRPC_CONFIG: list[] = ...") [var-annotated] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/connection_utils.py:5: error: Explicit "Any" is not allowed [explicit-any] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/process_metadata.py:27: error: Explicit "Any" is not allowed [explicit-any] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/process_metadata.py:40: error: Explicit "Any" is not allowed [explicit-any] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/client_side_state.py:5: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/client_side_state.py:13: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/client_side_state.py:13: note: Use "-> None" if function does not return a value +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/client_side_state.py:17: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/client_side_state.py:17: note: Use "-> None" if function does not return a value +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/client_side_state.py:21: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/client_side_state.py:25: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/client_side_state.py:29: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/client_side_state.py:33: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/client_side_state.py:33: note: Use "-> None" if function does not return a value +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/client_side_state.py:37: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/client_side_state.py:37: note: Use "-> None" if function does not return a value +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/client_side_state.py:41: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/client_side_state.py:45: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/client_side_state.py:49: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/client_side_state.py:49: note: Use "-> None" if function does not return a value +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/client_side_state.py:53: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/client_side_state.py:53: note: Use "-> None" if function does not return a value +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/client_side_state.py:57: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_shell_process.py:7: error: Skipping analyzing "sh": module is installed, but missing library stubs or py.typed marker [import-untyped] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_shell_process.py:16: error: Argument 2 to "__init__" becomes "Any" due to an unfollowed import [no-any-unimported] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/exceptions.py:5: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager.py:51: error: Explicit "Any" is not allowed [explicit-any] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/utils/grpc_utils.py:93: error: "type[T]" has no attribute "DESCRIPTOR" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/utils/grpc_utils.py:94: error: Argument 2 to "UnpackingError" has incompatible type "type[T]"; expected "type[Message]" [arg-type] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/utils/utils.py:370: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/utils/utils.py:370: error: Function is missing a type annotation for one or more parameters [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_paramiko.py:14: error: Library stubs not installed for "paramiko" [import-untyped] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_paramiko.py:14: note: Hint: "python3 -m pip install types-paramiko" +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_paramiko.py:60: error: Type of variable becomes "dict[str, Any]" due to an unfollowed import [no-any-unimported] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_paramiko.py:61: error: Type of variable becomes "dict[str, Any]" due to an unfollowed import [no-any-unimported] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_paramiko.py:95: error: Missing return statement [return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_paramiko.py:95: error: Function "builtins.any" is not valid as a type [valid-type] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_paramiko.py:95: note: Perhaps you meant "typing.Any" instead of "any"? +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_paramiko.py:127: error: Returning Any from function declared to return "dict[str, any?]" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_paramiko.py:134: error: Explicit "Any" is not allowed [explicit-any] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_paramiko.py:166: error: Return type becomes "Any" due to an unfollowed import [no-any-unimported] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_paramiko.py:247: error: Argument 2 to "_add_identity_file" of "SSHProcessLifetimeManagerParamiko" has incompatible type "None"; expected "list[str]" [arg-type] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_paramiko.py:263: error: Argument 2 to "_add_identity_file" of "SSHProcessLifetimeManagerParamiko" has incompatible type "None"; expected "list[str]" [arg-type] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_paramiko.py:373: error: Incompatible types in assignment (expression has type "ProcessMetadata | None", variable has type "ProcessMetadata") [assignment] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_paramiko.py:379: error: Argument 1 to "_is_remote_process_alive" of "SSHProcessLifetimeManagerParamiko" has incompatible type "str | None"; expected "str" [arg-type] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_paramiko.py:379: error: Argument 2 to "_is_remote_process_alive" of "SSHProcessLifetimeManagerParamiko" has incompatible type "str | None"; expected "str" [arg-type] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_paramiko.py:379: error: Argument 3 to "_is_remote_process_alive" of "SSHProcessLifetimeManagerParamiko" has incompatible type "int | None"; expected "int" [arg-type] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_paramiko.py:485: error: Signature of "kill_all_processes" incompatible with supertype "drunc.processes.ssh_process_lifetime_manager.ProcessLifetimeManager" [override] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_paramiko.py:485: note: Superclass: +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_paramiko.py:485: note: def kill_all_processes(self, process_timeouts: dict[str, float] | None = ...) -> dict[str, ExitStatus | None] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_paramiko.py:485: note: Subclass: +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_paramiko.py:485: note: def kill_all_processes(self) -> dict[str, int | None] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_paramiko.py:518: error: Argument 3 to "_start_process_watcher" becomes "Any" due to an unfollowed import [no-any-unimported] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_paramiko.py:538: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_paramiko.py:538: note: Use "-> None" if function does not return a value +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_paramiko.py:541: error: Incompatible types in assignment (expression has type "ProcessMetadata | None", target has type "ProcessMetadata") [assignment] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_paramiko.py:650: error: Returning Any from function declared to return "list[str]" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_paramiko.py:664: error: Return type "dict[str, int | None]" of "kill_processes" incompatible with return type "dict[str, ExitStatus | None]" in supertype "drunc.processes.ssh_process_lifetime_manager.ProcessLifetimeManager" [override] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_paramiko.py:671: error: Return type "dict[str, int | None]" of "kill_processes_by_role" incompatible with return type "dict[str, ExitStatus | None]" in supertype "drunc.processes.ssh_process_lifetime_manager.ProcessLifetimeManager" [override] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_paramiko.py:749: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_paramiko.py:794: error: Return type becomes "Any" due to an unfollowed import [no-any-unimported] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_paramiko.py:802: error: Incompatible default for parameter "env_vars" (default has type "None", parameter has type "dict[str, str]") [assignment] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_paramiko.py:802: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_paramiko.py:802: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_paramiko.py:854: error: Argument 3 to "_kill_process_channel" becomes "Any" due to an unfollowed import [no-any-unimported] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_paramiko.py:878: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_paramiko.py:890: error: Return type "int | None" of "kill_process" incompatible with return type "ExitStatus | None" in supertype "drunc.processes.ssh_process_lifetime_manager.ProcessLifetimeManager" [override] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_paramiko.py:918: error: Returning Any from function declared to return "int | None" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_paramiko.py:937: error: Argument 1 to "_create_ssh_client" of "SSHProcessLifetimeManagerParamiko" has incompatible type "str | None"; expected "str" [arg-type] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_paramiko.py:937: error: Argument 2 to "_create_ssh_client" of "SSHProcessLifetimeManagerParamiko" has incompatible type "str | None"; expected "str" [arg-type] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_paramiko.py:1012: error: Argument 2 to "_send_remote_signal" becomes "Any" due to an unfollowed import [no-any-unimported] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_paramiko.py:1049: error: Returning Any from function declared to return "bool" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_paramiko.py:1056: error: Argument 2 to "_cleanup_remote_file_paramiko" becomes "Any" due to an unfollowed import [no-any-unimported] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/utils/flask_manager.py:10: error: Library stubs not installed for "psutil" [import-untyped] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/utils/flask_manager.py:10: note: Hint: "python3 -m pip install types-psutil" +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/authoriser/decorators.py:9: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/authoriser/decorators.py:10: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/authoriser/decorators.py:14: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/authoriser/decorators.py:14: error: Type of decorated function contains type "Any" ("_Wrapped[[VarArg(Any), KwArg(Any)], Any, [Any, Any, Any], Any]") [misc] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/authoriser/decorators.py:20: error: Unexpected keyword argument "responses" for "Response" [call-arg] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/authoriser/decorators.py:20: note: "Response" defined in "druncschema.request_response_pb2" +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/authoriser/decorators.py:23: error: Argument "data" to "Response" has incompatible type "PlainText"; expected "google.protobuf.any_pb2.Any | None" [arg-type] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/utils.py:9: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/utils.py:49: error: Function is missing a type annotation for one or more parameters [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/utils.py:63: error: Incompatible return value type (got "Any | None", expected "str") [return-value] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/utils.py:66: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/utils.py:67: error: Function is missing a type annotation for one or more parameters [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/utils/configuration.py:247: error: "object" has no attribute "get_dal" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/connectivity_service/client.py:24: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/connectivity_service/client.py:73: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/connectivity_service/client.py:180: error: Function is missing a type annotation for one or more parameters [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/connectivity_service/client.py:180: error: Missing type arguments for generic type "dict" [type-arg] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/connectivity_service/client.py:198: error: Returning Any from function declared to return "dict[Any, Any]" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/connectivity_service/client.py:215: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/connectivity_service/client.py:215: error: Function is missing a type annotation for one or more parameters [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/utils/shell_utils.py:190: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/utils/shell_utils.py:375: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/utils/shell_utils.py:393: error: Item "None" of "Context | None" has no attribute "command" [union-attr] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/utils/shell_utils.py:395: error: Item "None" of "Context | None" has no attribute "get_parameter_source" [union-attr] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/utils/shell_utils.py:395: error: Argument 1 to "get_parameter_source" of "Context" has incompatible type "str | Any | None"; expected "str" [arg-type] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/utils/shell_utils.py:396: error: Item "None" of "Context | None" has no attribute "params" [union-attr] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/utils/shell_utils.py:396: error: Invalid index type "str | Any | None" for "dict[str, Any]"; expected type "str" [index] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/utils/shell_utils.py:401: error: "object" has no attribute "send_msg" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/stateful_node.py:18: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/stateful_node.py:22: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/stateful_node.py:28: error: Function is missing a type annotation for one or more parameters [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/stateful_node.py:37: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/stateful_node.py:42: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/stateful_node.py:47: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/stateful_node.py:56: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/stateful_node.py:56: note: Use "-> None" if function does not return a value +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/stateful_node.py:61: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/stateful_node.py:61: note: Use "-> None" if function does not return a value +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/stateful_node.py:66: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/stateful_node.py:72: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/stateful_node.py:72: note: Use "-> None" if function does not return a value +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/stateful_node.py:77: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/stateful_node.py:77: note: Use "-> None" if function does not return a value +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/stateful_node.py:82: error: Function is missing a type annotation for one or more parameters [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/stateful_node.py:82: error: Explicit "Any" is not allowed [explicit-any] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/stateful_node.py:108: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/stateful_node.py:114: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/stateful_node.py:117: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/stateful_node.py:117: note: Use "-> None" if function does not return a value +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/stateful_node.py:119: error: Unexpected keyword argument "message" [call-arg] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/stateful_node.py:119: error: Unexpected keyword argument "custom_origin" [call-arg] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/stateful_node.py:129: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/stateful_node.py:132: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/stateful_node.py:135: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/stateful_node.py:138: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/stateful_node.py:141: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/stateful_node.py:144: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/stateful_node.py:147: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/stateful_node.py:150: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/stateful_node.py:153: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/stateful_node.py:153: note: Use "-> None" if function does not return a value +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/stateful_node.py:158: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/stateful_node.py:158: note: Use "-> None" if function does not return a value +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/stateful_node.py:163: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/stateful_node.py:166: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/stateful_node.py:166: note: Use "-> None" if function does not return a value +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/stateful_node.py:169: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/stateful_node.py:169: note: Use "-> None" if function does not return a value +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/stateful_node.py:172: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/stateful_node.py:175: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/stateful_node.py:185: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/stateful_node.py:206: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/stateful_node.py:234: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/stateful_node.py:244: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/stateful_node.py:254: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/stateful_node.py:264: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/stateful_node.py:277: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/grpc_child.py:36: error: Library stubs not installed for "grpc_status" [import-untyped] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/grpc_child.py:36: note: Hint: "python3 -m pip install types-grpcio-status" +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/grpc_child.py:60: error: "object" has no attribute "controller" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/grpc_child.py:62: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/grpc_child.py:72: error: Function is missing a type annotation for one or more parameters [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/grpc_child.py:88: error: Incompatible types in assignment (expression has type "int", variable has type "str") [assignment] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/grpc_child.py:90: error: Non-overlapping equality check (left operand type: "str", right operand type: "Literal[0]") [comparison-overlap] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/grpc_child.py:98: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/grpc_child.py:98: note: Use "-> None" if function does not return a value +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/grpc_child.py:101: error: Cannot determine type of "channel" [has-type] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/grpc_child.py:102: error: Cannot determine type of "channel" [has-type] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/grpc_child.py:139: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/grpc_child.py:190: error: Incompatible types in assignment (expression has type "None", variable has type "Channel") [assignment] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/grpc_child.py:260: error: Returning Any from function declared to return "StatusResponse" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/grpc_child.py:288: error: Returning Any from function declared to return "DescribeResponse" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/grpc_child.py:318: error: Returning Any from function declared to return "DescribeFSMResponse" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/grpc_child.py:348: error: Returning Any from function declared to return "ExecuteFSMCommandResponse" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/grpc_child.py:378: error: Returning Any from function declared to return "ExecuteExpertCommandResponse" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/grpc_child.py:407: error: Returning Any from function declared to return "IncludeResponse" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/grpc_child.py:436: error: Returning Any from function declared to return "ExcludeResponse" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/grpc_child.py:464: error: Returning Any from function declared to return "RecomputeStatusResponse" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/grpc_child.py:492: error: Returning Any from function declared to return "TakeControlResponse" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/grpc_child.py:520: error: Returning Any from function declared to return "SurrenderControlResponse" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/grpc_child.py:548: error: Returning Any from function declared to return "WhoIsInChargeResponse" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/grpc_child.py:576: error: Returning Any from function declared to return "ToErrorResponse" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/grpc_child.py:605: error: Incompatible types in assignment (expression has type "PlainText", variable has type "str") [assignment] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/configuration.py:9: error: Library stubs not installed for "jsonschema" [import-untyped] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/configuration.py:9: note: Hint: "python3 -m pip install types-jsonschema" +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/configuration.py:11: error: Skipping analyzing "kafkaopmon.OpMonPublisher": module is installed, but missing library stubs or py.typed marker [import-untyped] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/configuration.py:12: error: Skipping analyzing "opmonlib.publisher": module is installed, but missing library stubs or py.typed marker [import-untyped] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/configuration.py:13: error: Skipping analyzing "opmonlib.utils": module is installed, but missing library stubs or py.typed marker [import-untyped] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/configuration.py:50: error: Need type annotation for "environment" (hint: "environment: dict[, ] = ...") [var-annotated] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/configuration.py:51: error: Need type annotation for "settings" (hint: "settings: dict[, ] = ...") [var-annotated] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/configuration.py:56: error: Incompatible types in assignment (expression has type "object", variable has type "dict[Any, Any]") [assignment] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/configuration.py:57: error: Incompatible types in assignment (expression has type "object", variable has type "dict[Any, Any]") [assignment] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/configuration.py:61: error: "object" has no attribute "lower" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/configuration.py:80: error: "ConfHandler" has no attribute "log_path" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/configuration.py:82: error: Incompatible return value type (got "ConfHandler", expected "Self") [return-value] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/configuration.py:84: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/configuration.py:128: error: Argument 2 to "get_commandline_parameters" becomes "Any" due to an unfollowed import [no-any-unimported] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/configuration.py:128: error: Explicit "Any" is not allowed [explicit-any] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/configuration.py:207: error: Explicit "Any" is not allowed [explicit-any] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/configuration.py:218: error: Returning Any from function declared to return "dict[str, Any]" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/configuration.py:227: error: Explicit "Any" is not allowed [explicit-any] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/configuration.py:239: error: Returning Any from function declared to return "dict[str, Any]" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/configuration.py:247: error: Returning Any from function declared to return "dict[str, Any]" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/configuration.py:255: error: Returning Any from function declared to return "dict[str, Any]" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/configuration.py:264: error: Explicit "Any" is not allowed [explicit-any] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/controller_driver.py:120: error: Returning Any from function declared to return "StatusResponse" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/controller_driver.py:141: error: Returning Any from function declared to return "DescribeResponse" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/controller_driver.py:164: error: Returning Any from function declared to return "DescribeFSMResponse" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/controller_driver.py:187: error: Returning Any from function declared to return "ExecuteFSMCommandResponse" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/controller_driver.py:210: error: Returning Any from function declared to return "ExecuteExpertCommandResponse" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/controller_driver.py:231: error: Returning Any from function declared to return "IncludeResponse" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/controller_driver.py:252: error: Returning Any from function declared to return "ExcludeResponse" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/controller_driver.py:273: error: Returning Any from function declared to return "RecomputeStatusResponse" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/controller_driver.py:294: error: Returning Any from function declared to return "TakeControlResponse" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/controller_driver.py:315: error: Returning Any from function declared to return "SurrenderControlResponse" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/controller_driver.py:336: error: Returning Any from function declared to return "WhoIsInChargeResponse" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/controller_driver.py:357: error: Returning Any from function declared to return "ToErrorResponse" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/controller_driver.py:359: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/controller_driver.py:376: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/oks_parser.py:4: error: Skipping analyzing "confmodel_dal": module is installed, but missing library stubs or py.typed marker [import-untyped] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/oks_parser.py:35: error: Incompatible types in assignment (expression has type "str | None", variable has type "str") [assignment] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/oks_parser.py:89: error: Function is missing a type annotation for one or more parameters [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/oks_parser.py:108: error: Argument 1 to "component_disabled_from_session_dal" becomes "Any" due to an unfollowed import [no-any-unimported] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/oks_parser.py:147: error: Argument 3 to "collect_apps" becomes "Any" due to an unfollowed import [no-any-unimported] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/oks_parser.py:147: error: Argument 4 to "collect_apps" becomes "Any" due to an unfollowed import [no-any-unimported] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/oks_parser.py:156: error: Missing type arguments for generic type "Dict" [type-arg] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/oks_parser.py:285: error: Function is missing a type annotation for one or more parameters [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/oks_parser.py:317: error: Returning Any from function declared to return "str | None" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/oks_parser.py:322: error: Argument 1 to "collect_infra_apps" becomes "Any" due to an unfollowed import [no-any-unimported] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/oks_parser.py:322: error: Explicit "Any" is not allowed [explicit-any] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/oks_parser.py:378: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/utils.py:52: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/utils.py:52: error: Function is missing a type annotation for one or more parameters [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/utils.py:56: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/utils.py:56: error: Type of decorated function contains type "Any" ("def (session: Any, name: Any, user: Any, uuid: Any, **kwargs: Any) -> Any") [misc] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/utils.py:87: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/utils.py:98: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/utils.py:100: error: Need type annotation for "by_session" (hint: "by_session: dict[, ] = ...") [var-annotated] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/utils.py:108: error: Need type annotation for "node_by_id" (hint: "node_by_id: dict[, ] = ...") [var-annotated] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/utils.py:109: error: Need type annotation for "children" (hint: "children: dict[, ] = ...") [var-annotated] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/utils.py:132: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/utils.py:136: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/utils.py:147: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/utils.py:159: error: Argument 1 to "order_process_by_name" has incompatible type "RepeatedCompositeFieldContainer[ProcessInstance]"; expected "list[ProcessInstance]" [arg-type] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/utils.py:203: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/utils.py:220: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/utils.py:229: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/utils.py:238: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/utils.py:248: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/utils.py:257: error: Argument 1 to "join" has incompatible type "str | None"; expected "str" [arg-type] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/utils.py:264: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/utils.py:269: error: Incompatible default for parameter "app_log_path" (default has type "None", parameter has type "str") [assignment] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/utils.py:269: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/utils.py:269: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/utils.py:270: error: Incompatible default for parameter "session_log_path" (default has type "None", parameter has type "str") [assignment] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/utils.py:270: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/utils.py:270: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/utils.py:302: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/utils.py:307: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/utils.py:307: note: Use "-> None" if function does not return a value +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/utils.py:359: error: Incompatible types in assignment (expression has type "ConfHandler", variable has type "ProcessManagerConfHandler") [assignment] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/utils.py:361: error: Argument 3 to "getattr" has incompatible type "ConfTypes"; expected "ProcessManagerTypes" [arg-type] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/context.py:14: error: Incompatible types in assignment (expression has type "str", base class "ShellContext" defined the type as "None") [assignment] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/context.py:16: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/context.py:16: note: Use "-> None" if function does not return a value +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/context.py:21: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/context.py:21: error: Signature of "reset" incompatible with supertype "drunc.utils.shell_utils.ShellContext" [override] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/context.py:21: note: Superclass: +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/context.py:21: note: def reset(self, **kwargs: object) -> None +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/context.py:21: note: Subclass: +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/context.py:21: note: def reset(self, address: str = ...) -> Any +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/context.py:21: error: Incompatible default for parameter "address" (default has type "None", parameter has type "str") [assignment] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/context.py:21: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/context.py:21: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/context.py:27: error: Function is missing a type annotation for one or more parameters [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/context.py:27: error: Return type "Mapping[str, object]" of "create_drivers" incompatible with return type "MutableMapping[str, object]" in supertype "drunc.utils.shell_utils.ShellContext" [override] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/context.py:32: error: Function is missing a type annotation for one or more parameters [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/context.py:35: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/context.py:35: note: Use "-> None" if function does not return a value +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_shell.py:15: error: Skipping analyzing "sh": module is installed, but missing library stubs or py.typed marker [import-untyped] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_shell.py:73: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_shell.py:73: note: Use "-> None" if function does not return a value +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_shell.py:565: error: Returning Any from function declared to return "bool" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_shell.py:765: error: Need type annotation for "killed_uuids" (hint: "killed_uuids: set[] = ...") [var-annotated] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_shell.py:1112: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_shell.py:1354: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_shell.py:1363: error: Returning Any from function declared to return "int | None" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_shell.py:1365: error: Returning Any from function declared to return "int | None" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager_driver.py:89: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager_driver.py:115: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager_driver.py:121: error: Function is missing a type annotation for one or more parameters [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager_driver.py:121: error: Missing return statement [return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager_driver.py:157: error: "ConnectivityServiceClient" object is not iterable [misc] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager_driver.py:157: error: "None" object is not iterable [misc] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager_driver.py:162: error: Need type annotation for "last_boot_on_host_at" (hint: "last_boot_on_host_at: dict[, ] = ...") [var-annotated] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager_driver.py:243: error: Argument 3 to "_collect_all_apps" becomes "Any" due to an unfollowed import [no-any-unimported] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager_driver.py:248: error: Missing type arguments for generic type "Dict" [type-arg] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager_driver.py:276: error: Function is missing a type annotation for one or more parameters [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager_driver.py:310: error: Function is missing a type annotation for one or more parameters [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager_driver.py:312: error: Missing type arguments for generic type "Dict" [type-arg] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager_driver.py:392: error: Function is missing a type annotation for one or more parameters [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager_driver.py:422: error: Incompatible types in "yield" (actual type "None", expected type "BootRequest") [misc] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager_driver.py:425: error: Function is missing a type annotation for one or more parameters [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager_driver.py:425: error: Missing return statement [return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager_driver.py:447: error: Return value expected [return-value] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager_driver.py:449: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager_driver.py:450: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager_driver.py:473: error: Return type becomes "tuple[Any, Any]" due to an unfollowed import [no-any-unimported] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager_driver.py:473: error: Argument 2 to "check_port_conflicts" becomes "Any" due to an unfollowed import [no-any-unimported] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager_driver.py:473: error: Argument 3 to "check_port_conflicts" becomes "Any" due to an unfollowed import [no-any-unimported] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager_driver.py:511: error: Incompatible types in assignment (expression has type "list[Any]", variable has type "int") [assignment] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager_driver.py:516: error: Value of type "int" is not indexable [index] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager_driver.py:587: error: Missing type arguments for generic type "tuple" [type-arg] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager_driver.py:594: error: Argument 2 to "_connect_to_service" becomes "Any" due to an unfollowed import [no-any-unimported] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager_driver.py:604: error: Incompatible return value type (got "tuple[ConnectivityServiceClient, Any, Any]", expected "ConnectivityServiceClient | None") [return-value] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager_driver.py:605: error: Incompatible return value type (got "tuple[None, None, None]", expected "ConnectivityServiceClient | None") [return-value] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager_driver.py:607: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager_driver.py:607: error: Argument 2 to "_discover_controller" becomes "Any" due to an unfollowed import [no-any-unimported] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager_driver.py:626: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager_driver.py:629: error: Need type annotation for "env" (hint: "env: dict[, ] = ...") [var-annotated] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager_driver.py:645: error: Argument 1 to "get_control_type_and_uri_from_connectivity_service" has incompatible type "ConnectivityServiceClient"; expected "_ConnectivityService" [arg-type] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager_driver.py:645: note: Following member(s) of "ConnectivityServiceClient" have conflicts: +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager_driver.py:645: note: Expected: +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager_driver.py:645: note: def resolve(self, name: str, message_type: str) -> list[dict[str, object]] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager_driver.py:645: note: Got: +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager_driver.py:645: note: def resolve(self, uid_regex: str, data_type: str, ntries: Any = ...) -> dict[Any, Any] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager_driver.py:795: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager_driver.py:859: error: Missing type arguments for generic type "list" [type-arg] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager_driver.py:874: error: Missing type arguments for generic type "list" [type-arg] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager_driver.py:913: error: Returning Any from function declared to return "ProcessInstanceList" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager_driver.py:933: error: Returning Any from function declared to return "ProcessInstanceList" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager_driver.py:954: error: Returning Any from function declared to return "LogLines | None" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager_driver.py:987: error: Returning Any from function declared to return "ProcessInstanceList" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager_driver.py:1008: error: Returning Any from function declared to return "ProcessInstanceList" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager_driver.py:1029: error: Returning Any from function declared to return "ProcessInstanceList" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager_driver.py:1048: error: Returning Any from function declared to return "Description" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager_driver.py:1052: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager_driver.py:1079: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/cli_argument.py:6: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/cli_argument.py:10: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/cli_argument.py:13: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/cli_argument.py:41: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/cli_argument.py:42: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_from_forked_process.py:75: error: Missing type arguments for generic type "Queue" [type-arg] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_from_forked_process.py:100: error: Missing type arguments for generic type "Queue" [type-arg] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_from_forked_process.py:101: error: Missing type arguments for generic type "Queue" [type-arg] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_from_forked_process.py:102: error: Missing type arguments for generic type "Queue" [type-arg] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_from_forked_process.py:103: error: Missing type arguments for generic type "Queue" [type-arg] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_from_forked_process.py:163: error: Cannot assign to a method [method-assign] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_from_forked_process.py:240: error: Missing type arguments for generic type "Queue" [type-arg] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_from_forked_process.py:241: error: Missing type arguments for generic type "Queue" [type-arg] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_from_forked_process.py:242: error: Missing type arguments for generic type "Queue" [type-arg] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_from_forked_process.py:247: error: Missing type arguments for generic type "Queue" [type-arg] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_from_forked_process.py:256: error: Explicit "Any" is not allowed [explicit-any] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_from_forked_process.py:299: error: Explicit "Any" is not allowed [explicit-any] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_from_forked_process.py:474: error: Returning Any from function declared to return "list[str]" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_from_forked_process.py:504: error: Returning Any from function declared to return "bool" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_from_forked_process.py:517: error: Returning Any from function declared to return "ExitStatus | None" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_from_forked_process.py:534: error: Returning Any from function declared to return "ExitStatus | None" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_from_forked_process.py:556: error: Returning Any from function declared to return "ExitStatus | None" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_from_forked_process.py:593: error: Returning Any from function declared to return "dict[str, ExitStatus | None]" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_from_forked_process.py:608: error: Returning Any from function declared to return "dict[str, ExitStatus | None]" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_from_forked_process.py:627: error: Returning Any from function declared to return "dict[str, ExitStatus | None]" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_from_forked_process.py:641: error: Returning Any from function declared to return "str | None" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_from_forked_process.py:653: error: Returning Any from function declared to return "str | None" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_from_forked_process.py:674: error: Returning Any from function declared to return "list[str]" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_from_forked_process.py:710: error: Returning Any from function declared to return "RemotePidResult" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/processes/ssh_process_lifetime_manager_from_forked_process.py:714: error: Returning Any from function declared to return "dict[str, int | None]" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/context.py:14: error: Incompatible types in assignment (expression has type "str", base class "ShellContext" defined the type as "None") [assignment] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/context.py:16: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/context.py:20: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/context.py:20: error: Function is missing a type annotation for one or more parameters [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/context.py:20: error: Signature of "reset" incompatible with supertype "drunc.utils.shell_utils.ShellContext" [override] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/context.py:20: note: Superclass: +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/context.py:20: note: def reset(self, **kwargs: object) -> None +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/context.py:20: note: Subclass: +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/context.py:20: note: def reset(self, address: str = ..., **kwargs: Any) -> Any +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/context.py:28: error: Function is missing a type annotation for one or more parameters [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/context.py:38: error: Function is missing a type annotation for one or more parameters [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/context.py:41: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/context.py:41: note: Use "-> None" if function does not return a value +shell_utils.py:14: error: Function is missing a type annotation for one or more parameters [no-untyped-def] +shell_utils.py:45: error: "Command" has no attribute "commands" [attr-defined] +shell_utils.py:49: error: Incompatible types in assignment (expression has type "Parameter", variable has type "Option") [assignment] +shell_utils.py:51: error: Argument 1 to "get" of "dict" has incompatible type "str | None"; expected "str" [arg-type] +shell_utils.py:67: error: "Context" has no attribute "get_driver" [attr-defined] +shell_utils.py:71: error: Item "None" of "ProcessManagerDriver | None" has no attribute "ps" [union-attr] +shell_utils.py:75: error: Name "process_list" already defined on line 71 [no-redef] +shell_utils.py:75: error: Item "None" of "ProcessManagerDriver | None" has no attribute "ps" [union-attr] +shell_utils.py:82: error: "Context" has no attribute "get_driver" [attr-defined] +shell_utils.py:101: error: Name "sub_cmd" already defined on line 45 [no-redef] +shell_utils.py:101: error: "Command" has no attribute "commands" [attr-defined] +shell_utils.py:104: error: Invalid type comment or annotation [valid-type] +shell_utils.py:104: note: Suggestion: use dict[...] instead of dict(...) +shell_utils.py:119: error: Function is missing a return type annotation [no-untyped-def] +shell_utils.py:119: error: Argument 2 to "generate_fsm_sequence_command" becomes "Any" due to an unfollowed import [no-any-unimported] +shell_utils.py:148: error: Type of variable becomes "dict[str, Any]" due to an unfollowed import [no-any-unimported] +shell_utils.py:166: error: "Command" has no attribute "commands" [attr-defined] +shell_utils.py:176: error: Invalid type comment or annotation [valid-type] +shell_utils.py:176: note: Suggestion: use list[...] instead of list(...) +shell_utils.py:176: error: "Command" has no attribute "commands" [attr-defined] +shell_utils.py:187: error: Missing type arguments for generic type "partial" [type-arg] +shell_utils.py:190: error: Incompatible types in assignment (expression has type "def (*args: Any, **kwargs: Any) -> Any", variable has type "partial[Any]") [assignment] +shell_utils.py:193: error: Name "param" already defined on line 180 [no-redef] +shell_utils.py:197: error: Name "param_name" already defined on line 193 [no-redef] +shell_utils.py:211: error: Name "cmd" already defined on line 187 [no-redef] +context.py:20: error: Incompatible types in assignment (expression has type "str", base class "ShellContext" defined the type as "None") [assignment] +context.py:22: error: Function is missing a return type annotation [no-untyped-def] +context.py:22: note: Use "-> None" if function does not return a value +context.py:35: error: Invalid type comment or annotation [valid-type] +context.py:35: note: Suggestion: use list[...] instead of list(...) +context.py:38: error: Function is missing a return type annotation [no-untyped-def] +context.py:38: error: Signature of "reset" incompatible with supertype "drunc.utils.shell_utils.ShellContext" [override] +context.py:38: note: Superclass: +context.py:38: note: def reset(self, **kwargs: object) -> None +context.py:38: note: Subclass: +context.py:38: note: def reset(self, address_pm: str = ...) -> Any +context.py:42: error: Function is missing a type annotation for one or more parameters [no-untyped-def] +context.py:42: error: Return type "Mapping[str, object]" of "create_drivers" incompatible with return type "MutableMapping[str, object]" in supertype "drunc.utils.shell_utils.ShellContext" [override] +context.py:56: error: Incompatible types in assignment (expression has type "ControllerDriver", target has type "ProcessManagerDriver") [assignment] +context.py:57: error: "UnifiedShellContext" has no attribute "address"; maybe "address_pm"? [attr-defined] +context.py:62: error: Function is missing a type annotation for one or more parameters [no-untyped-def] +context.py:75: error: Function is missing a type annotation for one or more parameters [no-untyped-def] +context.py:104: error: "object" has no attribute "ps" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager.py:44: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager.py:84: error: Value of type "object" is not indexable [index] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager.py:85: error: Argument 1 to "DummyAuthoriser" has incompatible type "ConfHandler"; expected "DummyAuthoriserConfHandler" [arg-type] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager.py:87: error: Need type annotation for "process_store" (hint: "process_store: dict[, ] = ...") [var-annotated] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager.py:88: error: Need type annotation for "boot_request" (hint: "boot_request: dict[, ] = ...") [var-annotated] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager.py:92: error: Need type annotation for "expected_dead_applications" (hint: "expected_dead_applications: dict[, ] = ...") [var-annotated] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager.py:157: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager.py:160: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager.py:165: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager.py:166: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager.py:166: error: Function is missing a type annotation for one or more parameters [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager.py:174: error: Need type annotation for "dead_processes_prev" (hint: "dead_processes_prev: set[] = ...") [var-annotated] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager.py:175: error: Cannot determine type of "stop_event" [has-type] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager.py:195: error: "None" has no attribute "publish" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager.py:231: error: Function is untyped after decorator transformation [misc] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager.py:263: error: Function is untyped after decorator transformation [misc] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager.py:296: error: Function is untyped after decorator transformation [misc] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager.py:326: error: Function is untyped after decorator transformation [misc] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager.py:356: error: Function is untyped after decorator transformation [misc] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager.py:386: error: Function is untyped after decorator transformation [misc] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager.py:425: error: Function is untyped after decorator transformation [misc] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager.py:447: error: Function is untyped after decorator transformation [misc] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager.py:494: error: Function is untyped after decorator transformation [misc] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager.py:562: error: Missing type arguments for generic type "dict" [type-arg] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/process_manager.py:758: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/ssh_process_manager.py:30: error: Function is missing a type annotation for one or more parameters [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/ssh_process_manager.py:54: error: "ProcessLifetimeManager" not callable [operator] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/ssh_process_manager.py:63: error: Function is missing a type annotation for one or more parameters [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/ssh_process_manager.py:107: error: Incompatible return value type (got "dict[str, object]", expected "dict[str, float]") [return-value] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/ssh_process_manager.py:155: error: Missing type arguments for generic type "list" [type-arg] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/ssh_process_manager.py:169: error: Item "None" of "ProcessLifetimeManager | None" has no attribute "kill_processes" [union-attr] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/ssh_process_manager.py:185: error: Item "None" of "ExitStatus | Any | None" has no attribute "get_reported_exit_code" [union-attr] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/ssh_process_manager.py:185: error: Argument "return_code" to "_build_process_instance" of "SSHProcessManager" has incompatible type "int | Any | None"; expected "int" [arg-type] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/ssh_process_manager.py:200: error: Missing type arguments for generic type "list" [type-arg] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/ssh_process_manager.py:285: error: Item "None" of "ProcessLifetimeManager | None" has no attribute "read_log_file" [union-attr] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/ssh_process_manager.py:304: error: Item "None" of "ProcessLifetimeManager | None" has no attribute "get_process_stdout" [union-attr] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/ssh_process_manager.py:305: error: Item "None" of "ProcessLifetimeManager | None" has no attribute "get_process_stderr" [union-attr] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/ssh_process_manager.py:320: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/ssh_process_manager.py:320: error: Function is missing a type annotation for one or more parameters [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/ssh_process_manager.py:371: error: Item "None" of "ProcessLifetimeManager | None" has no attribute "start_process" [union-attr] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/ssh_process_manager.py:394: error: Item "None" of "ProcessLifetimeManager | None" has no attribute "is_process_alive" [union-attr] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/ssh_process_manager.py:395: error: Item "None" of "ProcessLifetimeManager | None" has no attribute "pop_early_exit_status" [union-attr] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/ssh_process_manager.py:416: error: Argument "return_code" to "_build_process_instance" of "SSHProcessManager" has incompatible type "int | Any | None"; expected "int" [arg-type] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/ssh_process_manager.py:464: error: Item "None" of "ProcessLifetimeManager | None" has no attribute "get_remote_pid" [union-attr] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/ssh_process_manager.py:470: error: Incompatible types in assignment (expression has type "str | Any | None", variable has type "str") [assignment] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/ssh_process_manager.py:480: error: Argument "return_code" to "_build_process_instance" of "SSHProcessManager" has incompatible type "int | None"; expected "int" [arg-type] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/ssh_process_manager.py:486: error: Argument "return_code" to "_build_process_instance" of "SSHProcessManager" has incompatible type "None"; expected "int" [arg-type] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/ssh_process_manager.py:489: error: Item "None" of "ProcessLifetimeManager | None" has no attribute "get_remote_pid" [union-attr] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/ssh_process_manager.py:493: error: Incompatible types in assignment (expression has type "str | Any | None", variable has type "str") [assignment] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/ssh_process_manager.py:506: error: Signature of "_send_msg_impl" incompatible with supertype "drunc.process_manager.process_manager.ProcessManager" [override] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/ssh_process_manager.py:506: note: Superclass: +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/ssh_process_manager.py:506: note: def _send_msg_impl(self, msg: str | None = ..., peer: str | None = ...) -> OutcomeStatus +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/ssh_process_manager.py:506: note: Subclass: +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/ssh_process_manager.py:506: note: def _send_msg_impl(self, msg: str, peer: str) -> OutcomeStatus +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/ssh_process_manager.py:544: error: Item "None" of "ProcessLifetimeManager | None" has no attribute "kill_process" [union-attr] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/ssh_process_manager.py:545: error: Argument 2 to "kill_process" of "ProcessLifetimeManager" has incompatible type "object"; expected "float" [arg-type] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/ssh_process_manager.py:607: error: Missing type arguments for generic type "list" [type-arg] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/ssh_process_manager.py:627: error: Item "None" of "ProcessLifetimeManager | None" has no attribute "crash_process" [union-attr] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/ssh_process_manager.py:633: error: Argument "return_code" to "_build_process_instance" of "SSHProcessManager" has incompatible type "None"; expected "int" [arg-type] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/ssh_process_manager.py:673: error: Item "None" of "ProcessLifetimeManager | None" has no attribute "is_process_alive" [union-attr] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/ssh_process_manager.py:700: error: Argument "return_code" to "_build_process_instance" of "SSHProcessManager" has incompatible type "int | None"; expected "int" [arg-type] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/ssh_process_manager.py:708: error: Item "None" of "ProcessLifetimeManager | None" has no attribute "kill_process" [union-attr] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/ssh_process_manager.py:709: error: Argument 2 to "kill_process" of "ProcessLifetimeManager" has incompatible type "object"; expected "float" [arg-type] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:30: error: Skipping analyzing "kubernetes": module is installed, but missing library stubs or py.typed marker [import-untyped] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:31: error: Skipping analyzing "kubernetes.client.rest": module is installed, but missing library stubs or py.typed marker [import-untyped] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:32: error: Skipping analyzing "kubernetes.config.config_exception": module is installed, but missing library stubs or py.typed marker [import-untyped] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:71: error: Function is missing a type annotation for one or more parameters [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:81: error: Need type annotation for "processed_uuids" (hint: "processed_uuids: set[] = ...") [var-annotated] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:179: error: Function is missing a type annotation for one or more parameters [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:224: error: Need type annotation for "managed_sessions" (hint: "managed_sessions: set[] = ...") [var-annotated] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:225: error: Need type annotation for "watchers" (hint: "watchers: list[] = ...") [var-annotated] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:227: error: Need type annotation for "sessions_pending_deletion" (hint: "sessions_pending_deletion: set[] = ...") [var-annotated] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:228: error: Need type annotation for "uuids_pending_deletion" (hint: "uuids_pending_deletion: set[] = ...") [var-annotated] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:230: error: Need type annotation for "final_exit_codes" (hint: "final_exit_codes: dict[, ] = ...") [var-annotated] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:238: error: Need type annotation for "_host_cache" (hint: "_host_cache: dict[, ] = ...") [var-annotated] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:330: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:421: error: Returning Any from function declared to return "bool" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:574: error: Returning Any from function declared to return "bool | None" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:694: error: Function is missing a type annotation for one or more parameters [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:758: error: Function is missing a type annotation for one or more parameters [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:902: error: Return type becomes "tuple[list[Any], list[Any]]" due to an unfollowed import [no-any-unimported] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:1111: error: Return type becomes "list[Any]" due to an unfollowed import [no-any-unimported] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:1166: error: Unsupported left operand type for + ("None") [operator] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:1166: note: Left operand is of type "Any | None" +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:1198: error: Return type becomes "Any" due to an unfollowed import [no-any-unimported] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:1198: error: Argument 5 to "_build_pod_main_container" becomes "list[Any]" due to an unfollowed import [no-any-unimported] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:1356: error: Missing type arguments for generic type "dict" [type-arg] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:1391: error: Return type becomes "list[Any] | None" due to an unfollowed import [no-any-unimported] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:1498: error: Return type becomes "Any" due to an unfollowed import [no-any-unimported] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:1498: error: Argument 4 to "_build_pod_manifest" becomes "Any" due to an unfollowed import [no-any-unimported] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:1498: error: Argument 6 to "_build_pod_manifest" becomes "list[Any] | None" due to an unfollowed import [no-any-unimported] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:1498: error: Argument 7 to "_build_pod_manifest" becomes "list[Any]" due to an unfollowed import [no-any-unimported] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:1503: error: Missing type arguments for generic type "dict" [type-arg] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:1563: error: Argument 4 to "_execute_pod_creation_api" becomes "Any" due to an unfollowed import [no-any-unimported] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:1591: error: Returning Any from function declared to return "str" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:1671: error: Function is missing a type annotation for one or more parameters [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:1796: error: Incompatible return value type (got "None", expected "str") [return-value] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:1801: error: Returning Any from function declared to return "str" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:1804: error: Incompatible return value type (got "None", expected "str") [return-value] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:1806: error: Function is missing a type annotation for one or more parameters [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:1891: error: Signature of "_get_process_uid" incompatible with supertype "drunc.process_manager.process_manager.ProcessManager" [override] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:1891: note: Superclass: +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:1891: note: def _get_process_uid(self, query: ProcessQuery, in_boot_request: bool = ..., order_by: str = ...) -> list[str] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:1891: note: Subclass: +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:1891: note: def _get_process_uid(self, query: ProcessQuery, order_by: str = ...) -> list[str] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:1891: error: Incompatible default for parameter "order_by" (default has type "None", parameter has type "str") [assignment] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:1891: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:1891: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:1971: error: Signature of "_send_msg_impl" incompatible with supertype "drunc.process_manager.process_manager.ProcessManager" [override] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:1971: note: Superclass: +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:1971: note: def _send_msg_impl(self, msg: str | None = ..., peer: str | None = ...) -> OutcomeStatus +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:1971: note: Subclass: +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:1971: note: def _send_msg_impl(self, msg: str, peer: str) -> OutcomeStatus +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:2061: error: Returning Any from function declared to return "str" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:2474: error: Function is missing a type annotation for one or more parameters [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:2533: error: Function is missing a type annotation for one or more parameters [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/k8s_process_manager.py:2578: error: Need type annotation for "pods_by_role" [var-annotated] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/ssh_process_manager_paramiko_client.py:8: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/ssh_process_manager_paramiko_client.py:11: error: Argument "LifetimeManagerClass" to "__init__" of "SSHProcessManager" has incompatible type "type[SSHProcessLifetimeManagerParamiko]"; expected "ProcessLifetimeManager" [arg-type] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/ssh_process_manager_shell.py:8: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/ssh_process_manager_shell.py:11: error: Argument "LifetimeManagerClass" to "__init__" of "SSHProcessManager" has incompatible type "type[SSHProcessLifetimeManagerShellOnForkedProcess]"; expected "ProcessLifetimeManager" [arg-type] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/fsm/configuration.py:5: error: Skipping analyzing "conffwk.dal": module is installed, but missing library stubs or py.typed marker [import-untyped] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/fsm/configuration.py:19: error: Type of variable becomes "Any" due to an unfollowed import [no-any-unimported] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/fsm/configuration.py:21: error: Argument 4 to "_fill_pre_post_transition_sequence_oks" becomes "list[Any] | None" due to an unfollowed import [no-any-unimported] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/fsm/configuration.py:82: error: Target type of cast becomes "Any" due to an unfollowed import [no-any-unimported] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/commands.py:55: error: "object" has no attribute "ps" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/commands.py:70: error: "object" has no attribute "boot" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/commands.py:90: error: "object" has no attribute "controller_address" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/commands.py:150: error: "object" has no attribute "dummy_boot" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/commands.py:190: error: "object" has no attribute "terminate" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/commands.py:199: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/commands.py:220: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/commands.py:230: error: "object" has no attribute "kill" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/commands.py:238: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/commands.py:253: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/commands.py:265: error: "object" has no attribute "flush" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/commands.py:273: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/commands.py:289: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/commands.py:304: error: "object" has no attribute "logs" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/commands.py:343: error: "object" has no attribute "restart" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/commands.py:346: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/commands.py:370: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/commands.py:383: error: "object" has no attribute "ps" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:74: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:100: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:186: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:219: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:226: error: "object" has no attribute "status" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:231: error: "object" has no attribute "describe" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:236: error: "ControllerContext" has no attribute "get_endpoint_display_host_overrides" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:246: error: Function is missing a type annotation for one or more parameters [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:259: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:259: note: Use "-> None" if function does not return a value +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:267: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:268: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:268: note: Use "-> None" if function does not return a value +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:299: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:392: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:394: error: "FSMCommand" has no attribute "name" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:404: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:410: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:416: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:422: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:428: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:435: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:441: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:480: error: Module "google.protobuf.any_pb2" is not valid as a type [valid-type] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:480: note: Perhaps you meant to use a protocol matching the module structure? +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:485: error: Name "arguments" already defined on line 457 [no-redef] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:494: error: Incompatible types in assignment (expression has type "google.protobuf.any_pb2.Any", variable has type "str | int | float | bool | None") [assignment] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:521: error: Incompatible types in assignment (expression has type "int_msg", variable has type "str | int | float | bool | None") [assignment] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:527: error: Incompatible types in assignment (expression has type "float_msg", variable has type "str | int | float | bool | None") [assignment] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:529: error: Incompatible types in assignment (expression has type "string_msg", variable has type "str | int | float | bool | None") [assignment] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:529: error: Argument "value" to "string_msg" has incompatible type "str | int | float"; expected "str" [arg-type] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:533: error: Incompatible types in assignment (expression has type "bool_msg", variable has type "str | int | float | bool | None") [assignment] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:533: error: Argument "value" to "bool_msg" has incompatible type "str | int | float"; expected "bool" [arg-type] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:540: error: Incompatible types in assignment (expression has type "ValueType", variable has type "str") [assignment] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:542: error: Argument 1 to "pack_to_any" has incompatible type "str | int | float"; expected "Message" [arg-type] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:547: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:561: error: Function is missing a type annotation for one or more parameters [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:592: error: "object" has no attribute "status" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:594: error: "object" has no attribute "status" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:611: error: "object" has no attribute "describe_fsm" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:633: error: "DummyCommand" has no attribute "arguments" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:641: error: Argument "arguments" to "FSMCommand" has incompatible type "dict[str, int | bool | str | float | None]"; expected "Mapping[str, google.protobuf.any_pb2.Any] | None" [arg-type] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:645: error: "object" has no attribute "status" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:666: error: "object" has no attribute "execute_fsm_command" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:711: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:728: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:746: error: Argument 1 to "render_status_table" has incompatible type "UnifiedShellContext"; expected "ControllerContext" [arg-type] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:750: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:750: error: Function is missing a type annotation for one or more parameters [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:767: error: Missing type arguments for generic type "partial" [type-arg] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:772: error: Incompatible types in assignment (expression has type "def (*args: Any, **kwargs: Any) -> Any", variable has type "partial[Any]") [assignment] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:782: error: Dict entry 0 has incompatible type "ValueType": "type[str]"; expected "int": "str | int | float" [dict-item] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:783: error: Dict entry 1 has incompatible type "ValueType": "type[int]"; expected "int": "str | int | float" [dict-item] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:784: error: Dict entry 2 has incompatible type "ValueType": "type[float]"; expected "int": "str | int | float" [dict-item] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:785: error: Dict entry 3 has incompatible type "ValueType": "type[bool]"; expected "int": "str | int | float" [dict-item] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:790: error: Invalid type comment or annotation [valid-type] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:790: note: Suggestion: use dict[...] instead of dict(...) +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:802: error: Incompatible types in assignment (expression has type "str | int | float | None", variable has type "ValueType") [assignment] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:811: error: "ValueType" not callable [operator] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:821: error: "ValueType" not callable [operator] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/shell_utils.py:840: error: Incompatible types in assignment (expression has type "Command", variable has type "partial[Any]") [assignment] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/process_manager.py:34: error: Need type annotation for "_cleanup_coroutines" (hint: "_cleanup_coroutines: list[] = ...") [var-annotated] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/process_manager.py:42: error: Incompatible default for parameter "log_path" (default has type "None", parameter has type "str") [assignment] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/process_manager.py:42: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/process_manager.py:42: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/process_manager.py:43: error: Incompatible default for parameter "ready_event" (default has type "None", parameter has type "bool") [assignment] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/process_manager.py:43: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/process_manager.py:43: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/process_manager.py:44: error: Incompatible default for parameter "signal_handler" (default has type "None", parameter has type "bool") [assignment] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/process_manager.py:44: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/process_manager.py:44: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/process_manager.py:45: error: Incompatible default for parameter "generated_port" (default has type "None", parameter has type "bool") [assignment] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/process_manager.py:45: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/process_manager.py:45: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/process_manager.py:52: error: "bool" not callable [operator] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/process_manager.py:68: error: Incompatible types in assignment (expression has type "ConfHandler", variable has type "ProcessManagerConfHandler") [assignment] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/process_manager.py:107: error: "bool" has no attribute "value" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/process_manager.py:117: error: "bool" has no attribute "set" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/process_manager/interface/process_manager.py:150: error: Argument 2 to "signal" has incompatible type "Callable[[int, FrameType], None]"; expected "Callable[[int, FrameType | None], Any] | int | Handlers | None" [arg-type] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:11: error: Library stubs not installed for "socks" [import-untyped] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:11: note: Hint: "python3 -m pip install types-PySocks" +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:32: error: Skipping analyzing "flask_restful": module is installed, but missing library stubs or py.typed marker [import-untyped] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:67: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:88: error: "ResponseDispatcher" has no attribute "uri" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:88: error: "ResponseDispatcher" has no attribute "node_type" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:98: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:98: note: Use "-> None" if function does not return a value +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:102: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:106: error: "type[ResponseListener]" has no attribute "port" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:107: error: "type[ResponseListener]" has no attribute "app" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:108: error: "type[ResponseListener]" has no attribute "api" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:108: error: "type[ResponseListener]" has no attribute "app" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:109: error: "type[ResponseListener]" has no attribute "queue" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:110: error: "type[ResponseListener]" has no attribute "handlers" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:112: error: "type[ResponseListener]" has no attribute "dispatcher" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:113: error: "type[ResponseListener]" has no attribute "dispatcher" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:115: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:120: error: "type[ResponseListener]" has no attribute "queue" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:121: error: "type[ResponseListener]" has no attribute "queue" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:122: error: "type[ResponseListener]" has no attribute "queue" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:125: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:128: error: "type[ResponseListener]" has no attribute "app" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:129: error: "type[ResponseListener]" has no attribute "app" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:131: error: "type[ResponseListener]" has no attribute "port" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:131: error: "type[ResponseListener]" has no attribute "app" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:141: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:145: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:146: error: "type[ResponseListener]" has no attribute "port" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:149: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:153: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:153: note: Use "-> None" if function does not return a value +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:154: error: "type[ResponseListener]" has no attribute "queue" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:155: error: "type[ResponseListener]" has no attribute "queue" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:160: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:160: error: Function is missing a type annotation for one or more parameters [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:172: error: "type[ResponseListener]" has no attribute "handlers" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:177: error: "type[ResponseListener]" has no attribute "handlers" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:180: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:187: error: "type[ResponseListener]" has no attribute "handlers" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:189: error: "type[ResponseListener]" has no attribute "handlers" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:192: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:192: error: Missing type arguments for generic type "dict" [type-arg] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:198: error: "type[ResponseListener]" has no attribute "handlers" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:199: error: "type[ResponseListener]" has no attribute "log" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:202: error: "type[ResponseListener]" has no attribute "handlers" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:213: error: Incompatible default for parameter "proxy_host" (default has type "None", parameter has type "str") [assignment] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:213: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:213: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:214: error: Incompatible default for parameter "proxy_port" (default has type "None", parameter has type "int") [assignment] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:214: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:214: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:227: error: Need type annotation for "response_queue" [var-annotated] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:230: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:233: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:262: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:262: error: Function is missing a type annotation for one or more parameters [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:263: error: Missing type arguments for generic type "dict" [type-arg] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:313: error: Incompatible types in assignment (expression has type "str", variable has type "None") [assignment] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:315: error: Missing type arguments for generic type "dict" [type-arg] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:348: error: Returning Any from function declared to return "dict[Any, Any]" [no-any-return] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:370: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:372: error: Unsupported left operand type for + ("None") [operator] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:372: note: Left operand is of type "Any | None" +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:373: error: Item "None" of "Any | None" has no attribute "runs_on" [union-attr] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:380: error: Function is missing a type annotation for one or more parameters [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:395: error: Argument "conf" to "FSM" has incompatible type "ConfHandler"; expected "ConfigProtocol" [arg-type] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:417: error: Argument "proxy_port" to "AppCommander" has incompatible type "int | None"; expected "int" [arg-type] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:560: error: "object" has no attribute "id" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/children_interface/rest_api_child.py:650: error: Item "None" of "str | None" has no attribute "upper" [union-attr] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/commands.py:25: error: "object" has no attribute "describe_fsm" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/commands.py:122: error: "object" has no attribute "recompute_status" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/commands.py:136: error: "object" has no attribute "name" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/commands.py:136: error: "object" has no attribute "address" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/commands.py:147: error: "ControllerContext" has no attribute "set_controller_driver" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/commands.py:154: error: Function is missing a return type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/commands.py:164: error: "object" has no attribute "name" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/commands.py:168: error: "object" has no attribute "address" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/commands.py:208: error: "object" has no attribute "take_control" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/commands.py:238: error: "object" has no attribute "surrender_control" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/commands.py:254: error: Function is missing a type annotation for one or more parameters [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/commands.py:281: error: "object" has no attribute "who_is_in_charge" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/commands.py:297: error: "object" has no attribute "include" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/commands.py:314: error: "object" has no attribute "exclude" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/commands.py:357: error: "object" has no attribute "execute_expert_command" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/commands.py:364: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/interface/commands.py:396: error: "object" has no attribute "to_error" [attr-defined] +commands.py:56: error: "ProcessManagerContext" has no attribute "session_name" [attr-defined] +commands.py:58: error: "object" has no attribute "ps" [attr-defined] +commands.py:66: error: "ProcessManagerContext" has no attribute "override_logs" [attr-defined] +commands.py:78: error: "object" has no attribute "boot" [attr-defined] +commands.py:79: error: "ProcessManagerContext" has no attribute "configuration_file" [attr-defined] +commands.py:80: error: "ProcessManagerContext" has no attribute "configuration_id" [attr-defined] +commands.py:104: error: "object" has no attribute "ps" [attr-defined] +commands.py:111: error: "object" has no attribute "controller_address" [attr-defined] +commands.py:115: error: "ProcessManagerContext" has no attribute "set_controller_driver" [attr-defined] +commands.py:130: error: "object" has no attribute "status" [attr-defined] +commands.py:140: error: "object" has no attribute "status" [attr-defined] +commands.py:142: error: "ProcessManagerContext" has no attribute "running_mode" [attr-defined] +commands.py:152: error: Function is missing a type annotation [no-untyped-def] +commands.py:169: error: Function is missing a type annotation [no-untyped-def] +commands.py:171: error: Function is missing a type annotation [no-untyped-def] +commands.py:171: error: Type of decorated function contains type "Any" ("def (*args: Any, **kwargs: Any) -> Any") [misc] +commands.py:182: error: Function is missing a type annotation [no-untyped-def] +commands.py:191: error: Function is missing a type annotation [no-untyped-def] +commands.py:200: error: Function is missing a type annotation [no-untyped-def] +commands.py:209: error: Function is missing a type annotation [no-untyped-def] +commands.py:218: error: Function is missing a type annotation [no-untyped-def] +commands.py:226: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/configuration.py:4: error: Skipping analyzing "confmodel_dal": module is installed, but missing library stubs or py.typed marker [import-untyped] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/configuration.py:7: error: Skipping analyzing "kafkaopmon.OpMonPublisher": module is installed, but missing library stubs or py.typed marker [import-untyped] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/configuration.py:8: error: Skipping analyzing "opmonlib.publisher": module is installed, but missing library stubs or py.typed marker [import-untyped] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/configuration.py:9: error: Skipping analyzing "opmonlib.utils": module is installed, but missing library stubs or py.typed marker [import-untyped] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/configuration.py:37: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/configuration.py:48: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/configuration.py:49: error: "object" has no attribute "get_dal" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/configuration.py:49: error: Item "None" of "OKSKey | None" has no attribute "session" [union-attr] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/configuration.py:51: error: Item "None" of "OKSKey | None" has no attribute "obj_uid" [union-attr] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/configuration.py:55: error: Item "None" of "OKSKey | None" has no attribute "obj_uid" [union-attr] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/configuration.py:123: error: "object" has no attribute "get_dal" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/configuration.py:123: error: Item "None" of "OKSKey | None" has no attribute "session" [union-attr] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/configuration.py:132: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/configuration.py:134: error: "object" has no attribute "_obj" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/configuration.py:139: error: Argument "config_filename" to "get_commandline_parameters" has incompatible type "object"; expected "str" [arg-type] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/configuration.py:154: error: Function is missing a type annotation [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/configuration.py:156: error: "object" has no attribute "_obj" [attr-defined] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/configuration.py:162: error: Argument "config_filename" to "get_commandline_parameters" has incompatible type "object"; expected "str" [arg-type] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/configuration.py:211: error: Function is missing a type annotation for one or more parameters [no-untyped-def] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/configuration.py:226: error: Argument 1 to "get_control_type_and_uri_from_connectivity_service" has incompatible type "ConnectivityServiceClient"; expected "_ConnectivityService" [arg-type] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/configuration.py:226: note: Following member(s) of "ConnectivityServiceClient" have conflicts: +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/configuration.py:226: note: Expected: +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/configuration.py:226: note: def resolve(self, name: str, message_type: str) -> list[dict[str, object]] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/configuration.py:226: note: Got: +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/configuration.py:226: note: def resolve(self, uid_regex: str, data_type: str, ntries: Any = ...) -> dict[Any, Any] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/configuration.py:247: error: Argument 2 to "gRPCChildNode" has incompatible type "ConfHandler"; expected "gRCPChildConfHandler" [arg-type] +/nfs/home/emmuhamm/nightly/NFD_DEV_260729_A9/pythoncode/drunc/src/drunc/controller/configuration.py:256: error: Argument 2 to "RESTAPIChildNode" has incompatible type "ConfHandler"; expected "RESTAPIChildNodeConfHandler" [arg-type] +shell.py:12: error: Library stubs not installed for "click_shell" [import-untyped] +shell.py:12: note: Hint: "python3 -m pip install types-click-shell" +shell.py:12: note: (or run "mypy --install-types" to install all missing stub packages) +shell.py:12: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports +shell.py:118: error: Function is untyped after decorator transformation [misc] +shell.py:330: error: "Command" has no attribute "add_command" [attr-defined] +shell.py:330: error: Argument 1 to "format_name_for_cli" has incompatible type "str | None"; expected "str" [arg-type] +shell.py:331: error: Argument 1 to "format_name_for_cli" has incompatible type "str | None"; expected "str" [arg-type] +shell.py:342: error: "Command" has no attribute "add_command" [attr-defined] +shell.py:342: error: Argument 1 to "format_name_for_cli" has incompatible type "str | None"; expected "str" [arg-type] +shell.py:343: error: Argument 1 to "format_name_for_cli" has incompatible type "str | None"; expected "str" [arg-type] +shell.py:369: error: "ConfHandler" has no attribute "controller"; maybe "controller_id"? [attr-defined] +shell.py:380: error: "Command" has no attribute "add_command" [attr-defined] +shell.py:385: error: "Command" has no attribute "add_command" [attr-defined] +shell.py:408: error: "Command" has no attribute "add_command" [attr-defined] +shell.py:408: error: Argument 1 to "format_name_for_cli" has incompatible type "str | None"; expected "str" [arg-type] +shell.py:409: error: Argument 1 to "format_name_for_cli" has incompatible type "str | None"; expected "str" [arg-type] +shell.py:418: error: "Command" has no attribute "add_command" [attr-defined] +shell.py:426: error: Function is missing a return type annotation [no-untyped-def] +shell.py:426: note: Use "-> None" if function does not return a value +shell.py:450: error: "Command" has no attribute "commands" [attr-defined] +shell.py:451: error: "Command" has no attribute "commands" [attr-defined] +shell.py:557: error: Argument 2 to "signal" has incompatible type "Callable[[int, FrameType], None]"; expected "Callable[[int, FrameType | None], Any] | int | Handlers | None" [arg-type] +shell.py:566: error: Function is missing a type annotation [no-untyped-def] +shell.py:566: error: Function is untyped after decorator transformation [misc] +shell.py:610: error: "Command" has no attribute "commands" [attr-defined] +shell.py:638: error: "Command" has no attribute "commands" [attr-defined] +shell.py:669: error: Argument 1 to "DruncBatchShellError" has incompatible type "NoSuchOption"; expected "str" [arg-type] +shell.py:672: error: Argument 1 to "DruncBatchShellArgError" has incompatible type "list[str]"; expected "str" [arg-type] +shell.py:675: error: Argument 1 to "DruncBatchShellError" has incompatible type "ClickException"; expected "str" [arg-type] +Found 705 errors in 44 files (checked 5 source files) diff --git a/src/drunc/unified_shell/shell.py b/src/drunc/unified_shell/shell.py index c939ffa33..8b2739a3e 100644 --- a/src/drunc/unified_shell/shell.py +++ b/src/drunc/unified_shell/shell.py @@ -6,6 +6,7 @@ import sys import types from time import sleep +from typing import cast from urllib.parse import ParseResult, urlparse import click @@ -115,7 +116,7 @@ ), ) # For production, change default to true/remove it @click.pass_context -def unified_shell( +def unified_shell( # type: ignore[misc] ctx: click.core.Context, process_manager: str, configuration_file: str, @@ -323,12 +324,14 @@ def unified_shell( f"{getpass.getuser()} connected from unified shell" ) + command_group = cast(click.Group, ctx.command) + # Add the unified shell Click commands to the CLI ctx.obj.log.debug("Adding [green]unified_shell[/green] commands") unified_shell_commands = [boot, ps, terminate] for cmd in unified_shell_commands: - ctx.command.add_command(cmd, format_name_for_cli(cmd.name)) - ctx.obj.dynamic_commands.add(format_name_for_cli(cmd.name)) + command_group.add_command(cmd, format_name_for_cli(cmd.name or "")) + ctx.obj.dynamic_commands.add(format_name_for_cli(cmd.name or "")) # Add the process manager Click commands to the CLI ctx.obj.log.debug("Adding [green]process_manager[/green] commands") @@ -339,22 +342,25 @@ def unified_shell( restart, ] for cmd in process_manager_commands: - ctx.command.add_command(cmd, format_name_for_cli(cmd.name)) - ctx.obj.dynamic_commands.add(format_name_for_cli(cmd.name)) + command_group.add_command(cmd, format_name_for_cli(cmd.name or "")) + ctx.obj.dynamic_commands.add(format_name_for_cli(cmd.name or "")) # Get all the controller commands by instantiating the stateful node defined in the # configuration and getting the FSM transitions from it. ctx.obj.log.debug("Defining the pseudo controller to get its FSM commands") controller_name = session_dal.segment.controller.id - controller_configuration = ControllerConfHandler.from_oks( - url=ctx.obj.configuration_file, - oks_key=OKSKey( - schema_file="schema/confmodel/dunedaq.schema.xml", - class_name="RCApplication", - obj_uid=controller_name, - session=ctx.obj.configuration_id, + controller_configuration = cast( + ControllerConfHandler, + ControllerConfHandler.from_oks( + url=ctx.obj.configuration_file, + oks_key=OKSKey( + schema_file="schema/confmodel/dunedaq.schema.xml", + class_name="RCApplication", + obj_uid=controller_name, + session=ctx.obj.configuration_id, + ), + session_name=ctx.obj.session_name, ), - session_name=ctx.obj.session_name, ) # Avoid setting up the ELISA logbook for the unified shell os.environ["DUNEDAQ_ELISA_LOGBOOK_APPARATUS"] = "unified_shell" @@ -377,12 +383,12 @@ def unified_shell( # Add the FSM transitions and sequences as Click commands to the CLI ctx.obj.log.debug("Adding [green]controller[/green] commands to the click context") for transition in transitions.commands: - ctx.command.add_command( + command_group.add_command( *generate_fsm_command(ctx.obj, transition, controller_name) ) ctx.obj.dynamic_commands.add(format_name_for_cli(transition.name)) for sequence in session_dal.segment.controller.fsm.command_sequences: - ctx.command.add_command( + command_group.add_command( *generate_fsm_sequence_command(ctx, sequence, controller_name) ) ctx.obj.dynamic_commands.add(format_name_for_cli(sequence.id)) @@ -405,8 +411,8 @@ def unified_shell( to_error, ] for cmd in controller_commands: - ctx.command.add_command(cmd, format_name_for_cli(cmd.name)) - ctx.obj.dynamic_commands.add(format_name_for_cli(cmd.name)) + command_group.add_command(cmd, format_name_for_cli(cmd.name or "")) + ctx.obj.dynamic_commands.add(format_name_for_cli(cmd.name or "")) parser = ctx.command.make_parser(ctx) _, extract_batch_args, _ = parser.parse_args(sys.argv[1:]) @@ -415,7 +421,7 @@ def unified_shell( # If any of the commands is in the click commands, set batch mode if ctx.obj.batch_commands: ctx.obj.running_mode = UnifiedShellMode.BATCH - ctx.command.add_command(start_shell, "start-shell") + command_group.add_command(start_shell, "start-shell") ctx.obj.dynamic_commands.add("start-shell") validate_chain(ctx, extract_batch_args) @@ -423,7 +429,7 @@ def unified_shell( if "start-shell" in ctx.obj.batch_commands: ctx.obj.running_mode = UnifiedShellMode.SEMIBATCH - def cleanup(): + def cleanup() -> None: """ Cleanup function to be called on exit. @@ -447,8 +453,8 @@ def cleanup(): ctx.obj.log.info( "Attempting graceful shutdown of the controller" ) - stop_run_cmd = ctx.command.commands.get("stop-run") - scrap_cmd = ctx.command.commands.get("scrap") + stop_run_cmd = command_group.commands.get("stop-run") + scrap_cmd = command_group.commands.get("scrap") if stop_run_cmd is not None: ctx.invoke(stop_run_cmd) else: @@ -541,7 +547,7 @@ def cleanup(): ctx.call_on_close(cleanup) # Handle SIGTERM to gracefully shutdown the unified_shell - def signal_sigterm_handler(signum: int, frame: types.FrameType) -> None: + def signal_sigterm_handler(signum: int, frame: types.FrameType | None) -> None: """ Handle the SIGTERM signal to gracefully shut down the unified_shell. @@ -563,10 +569,10 @@ def signal_sigterm_handler(signum: int, frame: types.FrameType) -> None: @unified_shell.result_callback() @click.pass_context -def _maybe_enter_shell(ctx, results, **_): +def _maybe_enter_shell(ctx: click.core.Context, results: object, **_: object) -> None: # type: ignore[misc] # If user requested interactive mode at the end if ctx.obj.running_mode == UnifiedShellMode.SEMIBATCH: - sh = click_shell.make_click_shell(ctx, prompt=ctx.command.shell.prompt) + sh = click_shell.make_click_shell(ctx, prompt="drunc-unified-shell > ") sh.cmdloop() @@ -607,7 +613,7 @@ def validate_chain(ctx: click.core.Context, chain_args: list[str]) -> None: ctx: Click context object containing the command registry. chain_args (list): Flattened list of tokens from extract_chain_tokens. """ - command_names = set(ctx.command.commands.keys()) + command_names = set(cast(click.Group, ctx.command).commands.keys()) def command_can_consume_more_positionals( command: click.Command, provided_args: list[str] @@ -635,7 +641,7 @@ def command_can_consume_more_positionals( cmd_args = cmd_args_real.copy() cmd_args_static = cmd_args_real.copy() - sub_cmd: click.Command = ctx.command.commands[cmd_name] + sub_cmd: click.Command = cast(click.Group, ctx.command).commands[cmd_name] # Validate the command as split by split_chain sub_cmd.make_context( @@ -666,10 +672,10 @@ def command_can_consume_more_positionals( raise DruncBatchShellMissingArg(prev_cmd_name, next_cmd_name) from e except click.NoSuchOption as e: - raise DruncBatchShellError(e) from e + raise DruncBatchShellError(str(e)) from e except click.UsageError as e: - raise DruncBatchShellArgError(cmd_args_static) from e + raise DruncBatchShellArgError(str(cmd_args_static)) from e except click.ClickException as e: - raise DruncBatchShellError(e) from e + raise DruncBatchShellError(str(e)) from e diff --git a/src/drunc/unified_shell/shell_utils.py b/src/drunc/unified_shell/shell_utils.py index 6f32b7aae..a56ba3456 100644 --- a/src/drunc/unified_shell/shell_utils.py +++ b/src/drunc/unified_shell/shell_utils.py @@ -1,22 +1,44 @@ import functools +from collections.abc import Sequence +from typing import TYPE_CHECKING, Protocol, cast import click -import conffwk from druncschema.controller_pb2 import DescribeFSMResponse from druncschema.process_manager_pb2 import ProcessInstanceList, ProcessQuery from drunc.controller.controller_driver import ControllerDriver from drunc.exceptions import DruncException, DruncSetupException -from drunc.process_manager.process_manager_driver import ProcessManagerDriver +from drunc.unified_shell.context import UnifiedShellContext from drunc.utils.utils import format_name_for_cli, get_logger +if TYPE_CHECKING: + pass + + +class SequenceEntryLike(Protocol): + id: str + + +class SequenceOptionLike(Protocol): + name: str | None + default: str | int | float | bool | None + show_default: bool + required: bool + help: str | None + type: object + + +class FSMSequenceLike(Protocol): + id: str + sequence: Sequence[SequenceEntryLike] + def run_fsm_sequence( sequence_commands: list[str], sequence_command_opts_and_args: dict[str, list[str]], ctx: click.core.Context, - obj: click.core.Context, - **kwargs, + obj: UnifiedShellContext, + **kwargs: str | int | float | bool | None, ) -> None: """ Execute a command sequence by invoking individual commands in order. @@ -37,19 +59,25 @@ def run_fsm_sequence( """ logger = get_logger("unified_shell.shell_utils") logger.info(f"Running sequence: {sequence_commands}") + command_group = cast(click.Group, ctx.command) # Check all required parameters for all commands in the sequence before executing # any command for cmd_name in sequence_commands: # Get the sub-command to check its parameters - sub_cmd: click.core.Command = ctx.command.commands[cmd_name] + check_cmd: click.Command = command_group.commands[cmd_name] # Check if all required parameters for the sub-command are provided in kwargs # If any required parameter is missing, log an error and exit - for param in sub_cmd.get_params(ctx): # type: click.core.Option + for param in check_cmd.get_params(ctx): # If the parameter is required and not provided, log an error and return + if param.name is None: + continue if param.required and kwargs.get(param.name) is None: - flag_display = param.opts[0] if param.opts else param.name + if isinstance(param, click.Option): + flag_display = param.opts[0] if param.opts else param.name + else: + flag_display = param.name logger.error( f"Aborting sequence! Command '{cmd_name}' requires " f"'{flag_display}' but it was not provided." @@ -64,18 +92,17 @@ def run_fsm_sequence( # These commands are not stateful. If they are a part of the sequence, they # should be run regardless of their position in the sequence - pmd: ProcessManagerDriver | None = obj.get_driver( - "process_manager", quiet_fail=True - ) + pmd = obj.get_driver("process_manager", quiet_fail=True) + process_list: ProcessInstanceList | None = None if command == "boot": - process_list: ProcessInstanceList = pmd.ps(ProcessQuery(names=[".*"])) - if not process_list.values: # We haven't started anything yet + if pmd is not None: + process_list = pmd.ps(ProcessQuery(names=[".*"])) + if process_list is not None and not process_list.values: accepted_command.append("boot") elif command == "terminate": - process_list: ProcessInstanceList = pmd.ps(ProcessQuery(names=[".*"])) - if ( - process_list.values - ): # We have started something that needs to be terminated + if pmd is not None: + process_list = pmd.ps(ProcessQuery(names=[".*"])) + if process_list is not None and process_list.values: accepted_command.append("terminate") # Get the FSM commands that can be ran from the current state @@ -98,27 +125,29 @@ def run_fsm_sequence( continue # Get the sub-command to invoke - sub_cmd: click.core.Command = ctx.command.commands[command] + invoke_cmd: click.Command = command_group.commands[command] # Build command kwargs - cmd_kwargs: dict(str, bool | str | int | float | None) = { + cmd_kwargs: dict[str, bool | str | int | float | None] = { param.name: kwargs[param.name] - for param in sub_cmd.get_params(ctx) - if param.name in kwargs + for param in invoke_cmd.get_params(ctx) + if param.name is not None and param.name in kwargs } # Invoke the command with the appropriate kwargs try: logger.info(f"Running command: '{command}'") - ctx.invoke(sub_cmd, **cmd_kwargs) - except DruncException as e: + ctx.invoke(invoke_cmd, **cmd_kwargs) + except DruncException: logger.error(f"Error running command: '{command}'") - raise e + raise def generate_fsm_sequence_command( - ctx: click.core.Context, sequence: "conffwk.dal.FSMsequence", controller_name: str -): + ctx: click.core.Context, + sequence: FSMSequenceLike, + controller_name: str, +) -> tuple[click.Command, str]: """ Parse a FSM sequence and generate a Click command to run it. @@ -145,7 +174,8 @@ def generate_fsm_sequence_command( str, list[str] ] = {} # {sequence_command: [sequence_command_option_name]} - sequence_options: dict[str, conffwk.dal.FSMParameter] = {} # {option_name: option} + sequence_options: dict[str, SequenceOptionLike] = {} + command_group = cast(click.Group, ctx.command) command_ids: list[str] = [command.id for command in sequence.sequence] @@ -163,7 +193,7 @@ def generate_fsm_sequence_command( for command_id in command_ids: # type: str # Parse the sequence command id to match the Click command name command_name: str = format_name_for_cli(command_id) - if command_name not in ctx.command.commands.keys(): + if command_name not in command_group.commands.keys(): raise DruncSetupException( f"Command {command_name} required by sequence {sequence.id} not found in the command list!" ) @@ -173,44 +203,44 @@ def generate_fsm_sequence_command( sequence_str += f"{command_name} {middle_text}" # Gather the command parameters, add them to the command options and args - params: list(click.core.Option) = ctx.command.commands[command_name].get_params( - ctx - ) + params = command_group.commands[command_name].get_params(ctx) sequence_command_options[command_name] = [] - for param in params: #  type: click.core.Option - if param.name == "help": + for param in params: + if not isinstance(param, click.Option): + continue + if param.name in (None, "help"): continue sequence_command_options[command_name].append(param.name) - sequence_options[param.name] = param + sequence_options[param.name] = cast(SequenceOptionLike, param) # Construct the sequence function - cmd: functools.partial = functools.partial( + base_cmd_fn = functools.partial( run_fsm_sequence, sequence_commands, sequence_command_options, ctx ) - cmd = click.pass_obj(cmd) + cmd_fn_with_obj = click.pass_obj(base_cmd_fn) # Add click options to the function - for param_name, param in sequence_options.items(): # type: str, conffwk.dal.FSMParameter - if param.name == "help": + for option_name, option in sequence_options.items(): + if option.name == "help": continue - param_name: str = format_name_for_cli(param_name) - param_default: str | int | float | bool | None = ( - param.default if param.default is not None else None + option_name_cli = format_name_for_cli(option_name) + option_default: str | int | float | bool | None = ( + option.default if option.default is not None else None ) - cmd = click.option( - f"--{param_name}", - type=param.type, - default=param_default, - show_default=param.show_default, - required=param.required, - help=param.help, - )(cmd) + cmd_fn_with_obj = click.option( + f"--{option_name_cli}", + type=option.type, + default=option_default, + show_default=option.show_default, + required=option.required, + help=option.help, + )(cmd_fn_with_obj) # Transform the function into a Click command - cmd: click.core.Command = click.command( + cmd = click.command( name=format_name_for_cli(sequence.id), help=f"Run the sequence {sequence.id}: {sequence_str}", - )(cmd) + )(cmd_fn_with_obj) return cmd, format_name_for_cli(sequence.id) diff --git a/src/drunc/utils/shell_utils.py b/src/drunc/utils/shell_utils.py index b0a6a0b16..72062f228 100644 --- a/src/drunc/utils/shell_utils.py +++ b/src/drunc/utils/shell_utils.py @@ -3,7 +3,16 @@ import abc import getpass from collections.abc import MutableMapping -from typing import Callable, ParamSpec, Protocol, TypeVar, cast +from typing import ( + TYPE_CHECKING, + Callable, + Literal, + ParamSpec, + Protocol, + TypeVar, + cast, + overload, +) import click from druncschema.token_pb2 import Token @@ -12,6 +21,10 @@ from drunc.exceptions import DruncShellException from drunc.utils.utils import get_logger +if TYPE_CHECKING: + from drunc.controller.controller_driver import ControllerDriver + from drunc.process_manager.process_manager_driver import ProcessManagerDriver + class CommandLike(Protocol): """Protocol for command-like objects.""" @@ -185,7 +198,9 @@ def __str__(self) -> str: class ShellContext: """Base class for shell contexts.""" - shell_id = None # used for logging if its a PM shell or Unified shell etc + shell_id: str | None = ( + None # used for logging if its a PM shell or Unified shell etc + ) def get_shell_id(self): return self.shell_id @@ -193,9 +208,13 @@ def get_shell_id(self): def _reset( self, name: str, - token_args: dict[str, object] = {}, - driver_args: dict[str, object] = {}, + token_args: dict[str, object] | None = None, + driver_args: dict[str, object] | None = None, ) -> None: + if token_args is None: + token_args = {} + if driver_args is None: + driver_args = {} self._console = Console() self._token = self.create_token(**token_args) self._drivers: MutableMapping[str, object] = self.create_drivers(**driver_args) @@ -216,10 +235,11 @@ def __init__(self, *args: object, **kwargs: object) -> None: exit(1) @abc.abstractmethod - def reset(self, **kwargs: object) -> None: + def reset(self, *args: object, **kwargs: object) -> None: """Reset the shell context. Args: + *args: Additional positional arguments. **kwargs: Additional keyword arguments. """ pass @@ -267,7 +287,45 @@ def set_driver(self, name: str, driver: object) -> None: raise DruncShellException(f"Driver {name} already present in this context") self._drivers[name] = driver - def get_driver(self, name: str | None = None, quiet_fail: bool = False) -> object: + @overload + def get_driver( + self, name: Literal["controller"], quiet_fail: Literal[False] = False + ) -> "ControllerDriver": ... + + @overload + def get_driver( + self, name: Literal["controller"], quiet_fail: Literal[True] + ) -> "ControllerDriver | None": ... + + @overload + def get_driver( + self, name: Literal["process_manager"], quiet_fail: Literal[False] = False + ) -> "ProcessManagerDriver": ... + + @overload + def get_driver( + self, name: Literal["process_manager"], quiet_fail: Literal[True] + ) -> "ProcessManagerDriver | None": ... + + @overload + def get_driver(self, name: str, quiet_fail: Literal[False] = False) -> object: ... + + @overload + def get_driver(self, name: str, quiet_fail: Literal[True]) -> object | None: ... + + @overload + def get_driver( + self, name: None = None, quiet_fail: Literal[False] = False + ) -> object: ... + + @overload + def get_driver( + self, name: None = None, quiet_fail: Literal[True] = True + ) -> object | None: ... + + def get_driver( + self, name: str | None = None, quiet_fail: bool = False + ) -> object | None: """Get a driver from the context. Args: @@ -388,12 +446,18 @@ def log_pm_cmd(obj: ShellContext): """ ctx_cmd = click.get_current_context(silent=True) - cmd_name = ctx_cmd.command.name if ctx_cmd else None - parms_dict = {} - for param in ctx_cmd.command.params: - name = param.name - if ctx_cmd.get_parameter_source(name) == click.core.ParameterSource.COMMANDLINE: - parms_dict[name] = f"{ctx_cmd.params[name]!r}" + cmd_name = ctx_cmd.command.name if ctx_cmd and ctx_cmd.command else None + parms_dict: dict[str, str] = {} + if ctx_cmd and ctx_cmd.command: + for param in ctx_cmd.command.params: + name = param.name + if name is None: + continue + if ( + ctx_cmd.get_parameter_source(name) + == click.core.ParameterSource.COMMANDLINE + ): + parms_dict[name] = f"{ctx_cmd.params[name]!r}" args = f" with arguments {parms_dict}" if parms_dict else "" session = f" for session {obj.session_name}" if hasattr(obj, "session_name") else ""