コード例 #1
0
ファイル: init.py プロジェクト: zymergen-luke/poetry
    def _validate_author(self, author, default):
        from poetry.packages.package import AUTHOR_REGEX

        author = author or default

        if author in ["n", "no"]:
            return

        m = AUTHOR_REGEX.match(author)
        if not m:
            raise ValueError("Invalid author string. Must be in the format: "
                             "John Smith <*****@*****.**>")

        return author
コード例 #2
0
ファイル: init.py プロジェクト: singulared/poetry
    def _validate_author(self, author, default):
        from poetry.packages.package import AUTHOR_REGEX

        author = author or default

        if author in ["n", "no"]:
            return

        m = AUTHOR_REGEX.match(author)
        if not m:
            raise ValueError(
                "Invalid author string. Must be in the format: "
                "John Smith <*****@*****.**>"
            )

        return author