Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
dholth committed Nov 13, 2023
1 parent 41630e6 commit 02683ea
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 9 deletions.
5 changes: 3 additions & 2 deletions libmamba/src/core/repo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ namespace mamba
{
for (const auto& [fn, pkg] : packages)
{
if (skip_packages != nullptr && skip_packages->count(std::string(fn))==1)
if (skip_packages != nullptr && skip_packages->count(std::string(fn)) == 1)
{
LOG_INFO << "Skip " << fn;
continue;
Expand All @@ -330,7 +330,8 @@ namespace mamba
}

// packages in the overlay may be null as a deletion marker
if (pkg.type() == simdjson::dom::element_type::NULL_VALUE) {
if (pkg.type() == simdjson::dom::element_type::NULL_VALUE)
{
LOG_INFO << "Skip NULL " << fn;
continue;
}
Expand Down
33 changes: 26 additions & 7 deletions libmambapy/src/libmambapy/bindings/legacy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -338,14 +338,33 @@ bind_submodule_impl(pybind11::module_ m)
py::class_<MRepo>(m, "Repo")
.def(py::init(
[](MPool& pool, const std::string& name, const std::string& filename, const std::string& url
) { return MRepo(pool, name, filename, RepoMetadata{ /* .url=*/url }, MRepo::RepodataParser::mamba); }
) {
return MRepo(
pool,
name,
filename,
RepoMetadata{ /* .url=*/url },
MRepo::RepodataParser::mamba
);
}
))
.def(py::init(
[](MPool& pool,
const std::string& name,
const std::string& filename,
const std::string overlay,
const std::string& url)
{
return MRepo(
pool,
name,
filename,
overlay,
RepoMetadata{ /* .url=*/url },
MRepo::RepodataParser::mamba
);
}
))
.def(py::init([](MPool& pool,
const std::string& name,
const std::string& filename,
const std::string overlay,
const std::string& url)
{ return MRepo(pool, name, filename, overlay, RepoMetadata{ /* .url=*/url }, MRepo::RepodataParser::mamba); }))
.def(py::init<MPool&, const PrefixData&>())
.def("add_extra_pkg_info", &MRepo::py_add_extra_pkg_info)
.def("set_installed", &MRepo::set_installed)
Expand Down

0 comments on commit 02683ea

Please sign in to comment.