diff --git a/src/poetry/version/version_selector.py b/src/poetry/version/version_selector.py index d40fcc7953a..342b7649ca3 100644 --- a/src/poetry/version/version_selector.py +++ b/src/poetry/version/version_selector.py @@ -32,7 +32,7 @@ def find_best_candidate( package_name, { "version": target_package_version or "*", - "allow_prereleases": allow_prereleases, + "allow-prereleases": allow_prereleases, "source": source, }, ) diff --git a/tests/helpers.py b/tests/helpers.py index 31233b827b9..08eb045baba 100644 --- a/tests/helpers.py +++ b/tests/helpers.py @@ -54,7 +54,7 @@ def get_dependency( constraint = {"version": constraint} constraint["optional"] = optional - constraint["allow_prereleases"] = allows_prereleases + constraint["allow-prereleases"] = allows_prereleases return Factory.create_dependency(name, constraint or "*", groups=groups)