Fix up macros type annotation

We only create XmlMacroDef later on.
This commit is contained in:
mvdbeek
2022-02-16 12:59:10 +01:00
parent 8e80077f31
commit 71571026f8
2 changed files with 7 additions and 2 deletions
+2
View File
@@ -50,9 +50,11 @@ from boltons.iterutils import (
LXML_AVAILABLE = True
try:
from lxml import etree
Element = etree._Element
except ImportError:
LXML_AVAILABLE = False
import xml.etree.ElementTree as etree # type: ignore[assignment,no-redef]
Element = etree.Element
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.util.retry import Retry
+5 -2
View File
@@ -2,7 +2,10 @@ import os
from copy import deepcopy
from typing import Dict, List
from galaxy.util import parse_xml
from galaxy.util import (
Element,
parse_xml,
)
REQUIRED_PARAMETER = object()
@@ -20,7 +23,7 @@ def load_with_references(path):
if macros_el is None:
return tree, []
macros: Dict[str, List[XmlMacroDef]] = {}
macros: Dict[str, List[Element]] = {}
macro_paths = _import_macros(macros_el, path, macros)
macros_el.clear()