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

Convert absolute import path to relative for better compatibility. #3036

Merged
merged 1 commit into from
Dec 5, 2023
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
5 changes: 4 additions & 1 deletion mamba/mamba/mamba.py
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,9 @@ def clean(args, parser):
def do_call(args, parser):
if hasattr(args, "func"):
relative_mod, func_name = args.func.rsplit(".", 1)
# make module relative following https://github.com/conda/conda/pull/13173
if relative_mod.startswith("conda.cli."):
relative_mod = f'.{relative_mod.split(".")[-1]}'
elif hasattr(args, "_plugin_subcommand"):
action = args._plugin_subcommand.action
relative_mod = f'.{action.__module__.split(".")[-1]}'
Expand Down Expand Up @@ -763,7 +766,7 @@ def format_param(nm, val):
exit_code = update(args, parser)
elif relative_mod == ".main_init":
exit_code = shell_init(args)
elif relative_mod == ".main_repoquery":
elif relative_mod in (".main_repoquery", "repoquery"):
exit_code = repoquery(args, parser)
else:
print(
Expand Down
Loading