From 5252843340c0860b39639f0136c97526ca2a7f2b Mon Sep 17 00:00:00 2001 From: Stephan Finkensieper Date: Fri, 26 Apr 2024 10:21:49 +0000 Subject: [PATCH] Make type hints compatible with Python-3.8 --- conda_lock/pypi_solver.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conda_lock/pypi_solver.py b/conda_lock/pypi_solver.py index a2393bd70..b5ae97d9c 100644 --- a/conda_lock/pypi_solver.py +++ b/conda_lock/pypi_solver.py @@ -4,7 +4,7 @@ from pathlib import Path from posixpath import expandvars -from typing import TYPE_CHECKING, Dict, List, Literal, Optional, Tuple +from typing import TYPE_CHECKING, Dict, List, Literal, Optional, Tuple, Union from urllib.parse import urldefrag, urlsplit, urlunsplit from clikit.api.io.flags import VERY_VERBOSE @@ -406,7 +406,7 @@ def _get_url(link: Link) -> str: class _HashChooser: def __init__( - self, link: Link, dependency: PoetryDependency | PoetryDependencyWithHash + self, link: Link, dependency: Union[PoetryDependency, PoetryDependencyWithHash] ): self.link = link self.dependency = dependency