Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Planemo type annotation: module planemo.conda #1284

Merged
merged 2 commits into from
Oct 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion planemo/conda.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@
import os
import threading
from copy import deepcopy
from typing import TYPE_CHECKING

from galaxy.tool_util.deps import conda_util
from galaxy.tool_util.deps.conda_util import CondaContext
from galaxy.util import unicodify

from planemo.exit_codes import (
Expand All @@ -22,6 +24,9 @@
)
from planemo.tools import yield_tool_sources_on_paths

if TYPE_CHECKING:
from planemo.cli import PlanemoCliContext

MESSAGE_ERROR_FAILED_INSTALL = "Attempted to install conda and failed."
MESSAGE_ERROR_CANNOT_INSTALL = "Cannot install Conda - perhaps due to a failed installation or permission problems."
MESSAGE_ERROR_NOT_INSTALLING = (
Expand All @@ -31,7 +36,7 @@
BEST_PRACTICE_CHANNELS = ["conda-forge", "bioconda", "defaults"]


def build_conda_context(ctx, **kwds):
def build_conda_context(ctx: "PlanemoCliContext", **kwds) -> CondaContext:
"""Build a galaxy-tool-util CondaContext tailored to planemo use.

Using planemo's common command-line/global config options.
Expand Down