def detect(parent_dir: Path) -> bool:
        """
        Check whether there seems to be a valid virtualenv within the given directory at
        either ./venv, or ./.venv
        """
        return (
            Virtualenv(parent_dir.joinpath("venv")).valid()
            or Virtualenv(parent_dir.joinpath(".venv")).valid()
        )

        Check whether there seems to be a valid virtualenv within the given directory at
        either ./venv, or ./.venv
        
poethepoet/virtualenv.py