diff --git a/src/nox_poetry/sessions.py b/src/nox_poetry/sessions.py index 538125fa..1c73174b 100644 --- a/src/nox_poetry/sessions.py +++ b/src/nox_poetry/sessions.py @@ -59,7 +59,7 @@ def to_constraint(requirement_string: str, line: int) -> Optional[str]: """Convert requirement to constraint.""" if any( requirement_string.startswith(prefix) - for prefix in ("-e ", "file://", "git+https://", "http://", "https://") + for prefix in ("-", "file://", "git+https://", "http://", "https://") ): return None diff --git a/tests/unit/test_sessions.py b/tests/unit/test_sessions.py index 1f3ecf22..a1994585 100644 --- a/tests/unit/test_sessions.py +++ b/tests/unit/test_sessions.py @@ -152,6 +152,11 @@ def test_session_build_package(proxy: nox_poetry.Session) -> None: "regex==2020.10.28; python_version == '3.5'", 'regex==2020.10.28; python_version == "3.5"', ), + ("-e ../lib/foo", ""), + ( + "--extra-index-url https://example.com/pypi/simple", + "", + ), ], ) def test_to_constraints(requirements: str, expected: str) -> None: