Skip to content

Commit

Permalink
Rename to 'ignore_unless_false'.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Sep 8, 2021
1 parent f11b87f commit 00c0ef5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ distutils.setup_keywords =
dependency_links = setuptools.dist:assert_string_list
test_loader = setuptools.dist:check_importable
test_runner = setuptools.dist:check_importable
use_2to3 = setuptools.dist:invalid_ignored_if_false
use_2to3 = setuptools.dist:invalid_unless_false
egg_info.writers =
PKG-INFO = setuptools.command.egg_info:write_pkg_info
requires.txt = setuptools.command.egg_info:write_requirements
Expand Down
6 changes: 3 additions & 3 deletions setuptools/dist.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,11 +289,11 @@ def assert_bool(dist, attr, value):
raise DistutilsSetupError(tmpl.format(attr=attr, value=value))


def invalid_ignored_if_false(dist, attr, value):
def invalid_unless_false(dist, attr, value):
if not value:
warnings.warn("{attr} is ignored", DistDeprecationWarning)
warnings.warn(f"{attr} is ignored.", DistDeprecationWarning)
return
raise DistutilsSetupError(f"{attr} is invalid if it is set to a true value.")
raise DistutilsSetupError(f"{attr} is invalid.")


def check_requirements(dist, attr, value):
Expand Down

0 comments on commit 00c0ef5

Please sign in to comment.