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
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