Skip to content

Commit bd086ec

Browse files
committed
Apply CR suggestions
1 parent 514bba1 commit bd086ec

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/poetry/utils/dependency_specification.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
DependencySpec = Dict[str, Union[str, bool, Dict[str, Union[str, bool]], List[str]]]
3030
BaseSpec = TypeVar("BaseSpec", DependencySpec, InlineTable)
3131

32+
GIT_URL_SCHEMES = {"git+http", "git+https", "git+ssh"}
33+
3234

3335
def dependency_to_specification(
3436
dependency: Dependency, specification: BaseSpec
@@ -143,7 +145,7 @@ def _parse_url(self, requirement: str) -> DependencySpec | None:
143145
if not (url_parsed.scheme and url_parsed.netloc):
144146
return None
145147

146-
if url_parsed.scheme in ["git+https", "git+ssh"]:
148+
if url_parsed.scheme in GIT_URL_SCHEMES:
147149
return self._parse_git_url(requirement)
148150

149151
if url_parsed.scheme in ["http", "https"]:

0 commit comments

Comments
 (0)