diff --git a/distutils/extension.py b/distutils/extension.py index 0b776145..fa088ec2 100644 --- a/distutils/extension.py +++ b/distutils/extension.py @@ -109,7 +109,7 @@ def __init__( if not isinstance(name, str): raise AssertionError("'name' must be a string") # noqa: TRY004 - # we handle the string case first; though strings are iterable, we disallow them + # handle the string case first; since strings are iterable, disallow them if isinstance(sources, str): raise AssertionError( # noqa: TRY004 "'sources' must be an iterable of strings or PathLike objects, not a string" diff --git a/distutils/tests/test_extension.py b/distutils/tests/test_extension.py index 31d1fc89..7b461284 100644 --- a/distutils/tests/test_extension.py +++ b/distutils/tests/test_extension.py @@ -69,7 +69,7 @@ def test_extension_init(self): assert ext.name == 'name' # the second argument, which is the list of files, must - # be a list of strings or PathLike objects, and not a string + # be an iterable of strings or PathLike objects, and not a string with pytest.raises(AssertionError): Extension('name', 'file') with pytest.raises(AssertionError):