diff --git a/conda_lock/conda_solver.py b/conda_lock/conda_solver.py index 7059be51e..135f717e3 100644 --- a/conda_lock/conda_solver.py +++ b/conda_lock/conda_solver.py @@ -268,8 +268,8 @@ def _get_pkgs_dirs( env = conda_env_override(platform) output = subprocess.check_output(args, env=env).decode() json_object_str = extract_json_object(output) - json_object: dict[str, Any] = json.loads(json_object_str) - pkgs_dirs_list: list[str] + json_object: Dict[str, Any] = json.loads(json_object_str) + pkgs_dirs_list: List[str] if "pkgs_dirs" in json_object: pkgs_dirs_list = json_object["pkgs_dirs"] elif "package cache" in json_object: diff --git a/conda_lock/lockfile/v1/models.py b/conda_lock/lockfile/v1/models.py index 919ea5944..3bddf28ed 100644 --- a/conda_lock/lockfile/v1/models.py +++ b/conda_lock/lockfile/v1/models.py @@ -127,9 +127,9 @@ def create( except ImportError: return None - git_sha: str | None = None - git_user_name: str | None = None - git_user_email: str | None = None + git_sha: Optional[str] = None + git_user_name: Optional[str] = None + git_user_email: Optional[str] = None try: repo = git.Repo(search_parent_directories=True) diff --git a/conda_lock/virtual_package.py b/conda_lock/virtual_package.py index 8f2fecf3b..bab39499c 100644 --- a/conda_lock/virtual_package.py +++ b/conda_lock/virtual_package.py @@ -48,8 +48,8 @@ def to_repodata_entry(self) -> Tuple[str, Dict[str, Any]]: class FakeRepoData(BaseModel): base_path: pathlib.Path - packages_by_subdir: defaultdict[FakePackage, Set[str]] = Field( - default_factory=lambda: defaultdict[FakePackage, Set[str]](set) + packages_by_subdir: DefaultDict[FakePackage, Set[str]] = Field( + default_factory=lambda: defaultdict(set) # type: ignore[arg-type] ) all_subdirs: Set[str] = { "noarch", @@ -60,7 +60,7 @@ class FakeRepoData(BaseModel): "osx-arm64", "win-64", } - all_repodata: Dict[str, dict] = {} + all_repodata: Dict[str, Dict[str, Any]] = {} hash: Optional[str] = None old_env_vars: Dict[str, Optional[str]] = {}