File tree Expand file tree Collapse file tree 2 files changed +13
-8
lines changed
Expand file tree Collapse file tree 2 files changed +13
-8
lines changed Original file line number Diff line number Diff line change 2424_rust_dicttoxml = None
2525
2626try :
27- from json2xml_rs import dicttoxml as _rust_dicttoxml
28- from json2xml_rs import escape_xml_py as rust_escape_xml
29- from json2xml_rs import wrap_cdata_py as rust_wrap_cdata
27+ from json2xml_rs import dicttoxml as _rust_dicttoxml # type: ignore[import-not-found]
28+ from json2xml_rs import escape_xml_py as rust_escape_xml # type: ignore[import-not-found]
29+ from json2xml_rs import wrap_cdata_py as rust_wrap_cdata # type: ignore[import-not-found]
3030 _USE_RUST = True
3131 LOG .debug ("Using Rust backend for dicttoxml" )
3232except ImportError :
3535 rust_wrap_cdata = None
3636
3737# Import the pure Python implementation as fallback
38- from json2xml import dicttoxml as _py_dicttoxml
38+ from json2xml import dicttoxml as _py_dicttoxml # noqa: E402
3939
4040
4141def is_rust_available () -> bool :
Original file line number Diff line number Diff line change 1010
1111# Check if Rust extension is available
1212try :
13- from json2xml_rs import dicttoxml as rust_dicttoxml
14- from json2xml_rs import escape_xml_py , wrap_cdata_py
13+ from json2xml_rs import dicttoxml as rust_dicttoxml # type: ignore[import-not-found]
14+ from json2xml_rs import escape_xml_py , wrap_cdata_py # type: ignore[import-not-found]
1515 RUST_AVAILABLE = True
1616except ImportError :
1717 RUST_AVAILABLE = False
1818
1919from json2xml import dicttoxml as py_dicttoxml
20- from json2xml .dicttoxml_fast import dicttoxml as fast_dicttoxml , is_rust_available , get_backend
21-
20+ from json2xml .dicttoxml_fast import (
21+ dicttoxml as fast_dicttoxml ,
22+ )
23+ from json2xml .dicttoxml_fast import (
24+ get_backend ,
25+ is_rust_available ,
26+ )
2227
2328# Skip all tests if Rust is not available
2429pytestmark = pytest .mark .skipif (not RUST_AVAILABLE , reason = "Rust extension not installed" )
You can’t perform that action at this time.
0 commit comments