Skip to content

Commit

Permalink
fix: Support PDM 2.16 API
Browse files Browse the repository at this point in the history
Issue-11: #11
PR-12: #12
  • Loading branch information
natir authored Jul 2, 2024
1 parent 943fc4b commit 181f9f2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/pdm_multirun/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@

from pdm import termui
from pdm.cli.commands.run import Command as RunCommand
from pdm.cli.commands.run import Project
from pdm.cli.commands.use import Command as UseCommand
from pdm.cli.hooks import HookManager

if TYPE_CHECKING:
import argparse

from pdm.core import Core
from pdm.core import Core, Project

PYTHON_VERSIONS = os.getenv("PDM_MULTIRUN_VERSIONS", "").split() or [f"3.{minor}" for minor in range(8, 13)]
USE_VENVS = os.getenv("PDM_MULTIRUN_USE_VENVS", "") == "1"
Expand Down Expand Up @@ -61,7 +60,7 @@ def handle(self, project: Project, options: argparse.Namespace) -> None: # noqa
use_kwargs = {"venv" if options.venvs else "python": selected}
try:
self._use(project, options, **use_kwargs)
except Exception: # noqa: BLE001
except Exception:
if options.fail_fast:
raise
project.core.ui.echo(f"Skipped interpreter/venv: {selected}", verbosity=termui.Verbosity.DETAIL)
Expand Down

0 comments on commit 181f9f2

Please sign in to comment.