(
name: str,
constraint: str | dict[str, Any] | None = None,
groups: list[str] | None = None,
optional: bool = False,
allows_prereleases: bool = False,
)
| 61 | |
| 62 | |
| 63 | def get_dependency( |
| 64 | name: str, |
| 65 | constraint: str | dict[str, Any] | None = None, |
| 66 | groups: list[str] | None = None, |
| 67 | optional: bool = False, |
| 68 | allows_prereleases: bool = False, |
| 69 | ) -> Dependency: |
| 70 | if constraint is None: |
| 71 | constraint = "*" |
| 72 | |
| 73 | if isinstance(constraint, str): |
| 74 | constraint = {"version": constraint} |
| 75 | |
| 76 | constraint["optional"] = optional |
| 77 | constraint["allow-prereleases"] = allows_prereleases |
| 78 | |
| 79 | return Factory.create_dependency(name, constraint or "*", groups=groups) |
| 80 | |
| 81 | |
| 82 | def copy_path(source: Path, dest: Path) -> None: |
no outgoing calls
searching dependent graphs…