From c255ed8a6b3f5b1f81096a19072619b4ea045380 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Wed, 18 May 2022 12:03:50 +0100 Subject: [PATCH] Improve warning message for _InvalidFile --- setuptools/config/pyprojecttoml.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/setuptools/config/pyprojecttoml.py b/setuptools/config/pyprojecttoml.py index be812142e0..976eb0634c 100644 --- a/setuptools/config/pyprojecttoml.py +++ b/setuptools/config/pyprojecttoml.py @@ -418,7 +418,7 @@ class _ExperimentalProjectMetadata(UserWarning): class _InvalidFile(UserWarning): - """Inform users that the given `pyproject.toml` is experimental: + """The given `pyproject.toml` file is invalid and would be ignored. !!\n\n ############################ # Invalid `pyproject.toml` # @@ -436,5 +436,4 @@ class _InvalidFile(UserWarning): @classmethod def message(cls): from inspect import cleandoc - msg = "\n".join(cls.__doc__.splitlines()[1:]) - return cleandoc(msg) + return cleandoc(cls.__doc__)