MCPcopy Create free account
hub / github.com/archlinux/alpm / source_info_from_str

Function source_info_from_str

python-alpm/src/srcinfo/source_info/mod.rs:23–30  ·  view source on GitHub ↗
(
    s: &str,
    schema: Option<SourceInfoSchema>,
)

Source from the content-addressed store, hash-verified

21#[pyfunction]
22#[pyo3(signature = (s, schema = None))]
23pub fn source_info_from_str(
24 s: &str,
25 schema: Option<SourceInfoSchema>,
26) -> Result<SourceInfo, crate::srcinfo::error::Error> {
27 let schema: Option<alpm_srcinfo::SourceInfoSchema> = schema.map(From::from);
28 let inner = alpm_srcinfo::SourceInfo::from_str_with_schema(s, schema)?;
29 Ok(inner.into())
30}
31
32#[pyfunction]
33#[pyo3(signature = (path, schema = None))]

Callers 4

test_from_str_validFunction · 0.85
test_from_str_invalidFunction · 0.85

Calls

no outgoing calls

Tested by 4

test_from_str_validFunction · 0.68
test_from_str_invalidFunction · 0.68