Add Tags::from_interpreter (#498)

Small refactoring
This commit is contained in:
konsti 2023-11-24 12:36:01 +01:00 committed by GitHub
parent f7976ce5cc
commit 8d247fe95b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 12 additions and 20 deletions

View file

@ -121,10 +121,7 @@ pub(crate) async fn pip_compile(
);
// Determine the compatible platform tags.
let tags = Tags::from_env(
venv.interpreter().platform(),
venv.interpreter().simple_version(),
)?;
let tags = Tags::from_interpreter(venv.interpreter())?;
// Determine the markers to use for resolution.
let markers = python_version.map_or_else(

View file

@ -104,10 +104,7 @@ pub(crate) async fn sync_requirements(
}
// Determine the current environment markers.
let tags = Tags::from_env(
venv.interpreter().platform(),
venv.interpreter().simple_version(),
)?;
let tags = Tags::from_interpreter(venv.interpreter())?;
// Instantiate a client.
let client = {