from typing import Optional


def ensure_pep440_req(req: str) -> Optional[str]:
    """Discard all non-PEP 440 requirements, e.g. editable VCS requirements."""

    if req.strip().startswith("-e"):
        return None
    return req