mirror of https://github.com/mamba-org/mamba.git
fix stubs (#2817)
* Downpin pybind11-stubgen * Fix stubgens * Regenerate stubs
This commit is contained in:
parent
bbac096a04
commit
69a2cd30e2
|
@ -19,6 +19,6 @@ dependencies:
|
|||
- spdlog
|
||||
- fmt
|
||||
- pybind11
|
||||
- pybind11-stubgen
|
||||
- pybind11-stubgen <1.0
|
||||
- pytest >=7.3
|
||||
- sel(win): winreg
|
||||
|
|
|
@ -112,6 +112,7 @@ __all__ = [
|
|||
"SpecBase",
|
||||
"SpecImpl",
|
||||
"SubdirData",
|
||||
"TimeRef",
|
||||
"Transaction",
|
||||
"cache_fn_url",
|
||||
"cancel_json_output",
|
||||
|
@ -1341,7 +1342,7 @@ class Solver:
|
|||
def add_global_job(self, arg0: int) -> None: ...
|
||||
def add_jobs(self, arg0: typing.List[str], arg1: int) -> None: ...
|
||||
def add_pin(self, arg0: str) -> None: ...
|
||||
def all_problems_structured(self) -> typing.List[mamba::MSolverProblem]: ...
|
||||
def all_problems_structured(self) -> typing.List[SolverProblem]: ...
|
||||
def all_problems_to_str(self) -> str: ...
|
||||
def explain_problems(self) -> str: ...
|
||||
def is_solved(self) -> bool: ...
|
||||
|
@ -1555,6 +1556,16 @@ class SubdirData:
|
|||
def loaded(self) -> bool: ...
|
||||
pass
|
||||
|
||||
class TimeRef:
|
||||
@typing.overload
|
||||
def __init__(self) -> None: ...
|
||||
@typing.overload
|
||||
def __init__(self, arg0: int) -> None: ...
|
||||
def set(self, arg0: int) -> None: ...
|
||||
def set_now(self) -> None: ...
|
||||
def timestamp(self) -> str: ...
|
||||
pass
|
||||
|
||||
class Transaction:
|
||||
@typing.overload
|
||||
def __init__(self, arg0: Solver, arg1: MultiPackageCache) -> None: ...
|
||||
|
|
|
@ -277,6 +277,17 @@ PYBIND11_MODULE(bindings, m)
|
|||
.def("find_python_version", &MTransaction::py_find_python_version)
|
||||
.def("execute", &MTransaction::execute);
|
||||
|
||||
py::class_<MSolverProblem>(m, "SolverProblem")
|
||||
.def_readwrite("type", &MSolverProblem::type)
|
||||
.def_readwrite("source_id", &MSolverProblem::source_id)
|
||||
.def_readwrite("target_id", &MSolverProblem::target_id)
|
||||
.def_readwrite("dep_id", &MSolverProblem::dep_id)
|
||||
.def_readwrite("source", &MSolverProblem::source)
|
||||
.def_readwrite("target", &MSolverProblem::target)
|
||||
.def_readwrite("dep", &MSolverProblem::dep)
|
||||
.def_readwrite("description", &MSolverProblem::description)
|
||||
.def("__str__", [](const MSolverProblem& self) { return self.description; });
|
||||
|
||||
pySolver.def(py::init<MPool&, std::vector<std::pair<int, int>>>(), py::keep_alive<1, 2>())
|
||||
.def("add_jobs", &MSolver::add_jobs)
|
||||
.def("add_global_job", &MSolver::add_global_job)
|
||||
|
@ -300,17 +311,6 @@ PYBIND11_MODULE(bindings, m)
|
|||
.def("try_solve", &MSolver::try_solve)
|
||||
.def("must_solve", &MSolver::must_solve);
|
||||
|
||||
py::class_<MSolverProblem>(m, "SolverProblem")
|
||||
.def_readwrite("type", &MSolverProblem::type)
|
||||
.def_readwrite("source_id", &MSolverProblem::source_id)
|
||||
.def_readwrite("target_id", &MSolverProblem::target_id)
|
||||
.def_readwrite("dep_id", &MSolverProblem::dep_id)
|
||||
.def_readwrite("source", &MSolverProblem::source)
|
||||
.def_readwrite("target", &MSolverProblem::target)
|
||||
.def_readwrite("dep", &MSolverProblem::dep)
|
||||
.def_readwrite("description", &MSolverProblem::description)
|
||||
.def("__str__", [](const MSolverProblem& self) { return self.description; });
|
||||
|
||||
using PbGraph = ProblemsGraph;
|
||||
auto pyPbGraph = py::class_<PbGraph>(m, "ProblemsGraph");
|
||||
|
||||
|
@ -983,6 +983,13 @@ PYBIND11_MODULE(bindings, m)
|
|||
.def_readwrite("keys", &validation::RoleFullKeys::keys)
|
||||
.def_readwrite("threshold", &validation::RoleFullKeys::threshold);
|
||||
|
||||
py::class_<validation::TimeRef>(m, "TimeRef")
|
||||
.def(py::init<>())
|
||||
.def(py::init<std::time_t>())
|
||||
.def("set_now", &validation::TimeRef::set_now)
|
||||
.def("set", &validation::TimeRef::set)
|
||||
.def("timestamp", &validation::TimeRef::timestamp);
|
||||
|
||||
py::class_<validation::SpecBase, std::shared_ptr<validation::SpecBase>>(m, "SpecBase");
|
||||
|
||||
py::class_<validation::RoleBase, std::shared_ptr<validation::RoleBase>>(m, "RoleBase")
|
||||
|
|
|
@ -21,7 +21,7 @@ dependencies:
|
|||
- python
|
||||
- pip
|
||||
- pybind11
|
||||
- pybind11-stubgen
|
||||
- pybind11-stubgen <1.0
|
||||
- pytest >=7.3
|
||||
- pyyaml
|
||||
- conda
|
||||
|
|
Loading…
Reference in New Issue