mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Fix up macros type annotation
We only create XmlMacroDef later on.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user