daemon: updated core.emane to avoid using deprecated type hinting
This commit is contained in:
parent
3d722a7721
commit
4c222d1a7a
9 changed files with 73 additions and 78 deletions
|
@ -4,7 +4,6 @@ commeffect.py: EMANE CommEffect model for CORE
|
|||
|
||||
import logging
|
||||
from pathlib import Path
|
||||
from typing import Dict, List
|
||||
|
||||
from lxml import etree
|
||||
|
||||
|
@ -42,12 +41,12 @@ class EmaneCommEffectModel(emanemodel.EmaneModel):
|
|||
name: str = "emane_commeffect"
|
||||
shim_library: str = "commeffectshim"
|
||||
shim_xml: str = "commeffectshim.xml"
|
||||
shim_defaults: Dict[str, str] = {}
|
||||
config_shim: List[Configuration] = []
|
||||
shim_defaults: dict[str, str] = {}
|
||||
config_shim: list[Configuration] = []
|
||||
|
||||
# comm effect does not need the default phy and external configurations
|
||||
phy_config: List[Configuration] = []
|
||||
external_config: List[Configuration] = []
|
||||
phy_config: list[Configuration] = []
|
||||
external_config: list[Configuration] = []
|
||||
|
||||
@classmethod
|
||||
def load(cls, emane_prefix: Path) -> None:
|
||||
|
@ -56,11 +55,11 @@ class EmaneCommEffectModel(emanemodel.EmaneModel):
|
|||
cls.config_shim = emanemanifest.parse(shim_xml_path, cls.shim_defaults)
|
||||
|
||||
@classmethod
|
||||
def configurations(cls) -> List[Configuration]:
|
||||
def configurations(cls) -> list[Configuration]:
|
||||
return cls.platform_config + cls.config_shim
|
||||
|
||||
@classmethod
|
||||
def config_groups(cls) -> List[ConfigGroup]:
|
||||
def config_groups(cls) -> list[ConfigGroup]:
|
||||
platform_len = len(cls.platform_config)
|
||||
return [
|
||||
ConfigGroup("Platform Parameters", 1, platform_len),
|
||||
|
@ -71,7 +70,7 @@ class EmaneCommEffectModel(emanemodel.EmaneModel):
|
|||
),
|
||||
]
|
||||
|
||||
def build_xml_files(self, config: Dict[str, str], iface: CoreInterface) -> None:
|
||||
def build_xml_files(self, config: dict[str, str], iface: CoreInterface) -> None:
|
||||
"""
|
||||
Build the necessary nem and commeffect XMLs in the given path.
|
||||
If an individual NEM has a nonstandard config, we need to build
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue