Skip to content

Commit dfa89a3

Browse files
committed
fix: use tomli module for parsing pyproject
1 parent fb3d336 commit dfa89a3

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

scfw/package_managers/uv/temp_project.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,17 @@
66
import logging
77
import shutil
88
import subprocess
9-
import tomllib
109
import uuid
1110
from pathlib import Path
1211
from tempfile import TemporaryDirectory
1312
from types import TracebackType
1413
from typing import Optional
1514

15+
try:
16+
import tomllib # type: ignore[import-not-found]
17+
except ImportError:
18+
import tomli as tomllib # type: ignore[no-redef]
19+
1620
from packaging.requirements import Requirement
1721
from typing_extensions import Self
1822

0 commit comments

Comments
 (0)