feat!: fix templates with the caller's values replace run_device_action (0.8.0) #31

Merged
christianmanivong merged 5 commits from feat/fix-templates-27 into master 2026-10-16 23:17:15 +00:00
2 changed files with 12 additions and 1 deletions
Showing only changes of commit 8af7c52d82 - Show all commits

No files matched your search

+1 -1
View File
@@ -23,7 +23,7 @@ import logging
import re import re
import socket import socket
from shlex import quote as _shlex_quote from shlex import quote as _shlex_quote
from typing import Any from typing import Any, Dict, List, Optional
from netmiko import ConnectHandler from netmiko import ConnectHandler
from netmiko.exceptions import ( from netmiko.exceptions import (
+11
View File
@@ -180,3 +180,14 @@ def test_run_device_action_is_gone():
"_action_apt_update_upgrade", "_action_apt_update_upgrade",
): ):
assert not hasattr(LinuxDriver, name), name assert not hasattr(LinuxDriver, name), name
def test_every_annotation_resolves():
"""``Dict``, ``List`` and ``Optional`` were used without being imported (#29);
``from __future__ import annotations`` hid it until something resolved them."""
import inspect
import typing
for name, member in inspect.getmembers(LinuxDriver, inspect.isfunction):
if member.__module__ == "napalm_linux.linux":
typing.get_type_hints(member)