From f5b7336316af0e984e4b55a361aeb29225f7065e Mon Sep 17 00:00:00 2001 From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com> Date: Thu, 26 Dec 2024 23:28:57 +0530 Subject: [PATCH] Add review suggestions around code comments Co-authored-by: Jason R. Coombs Co-authored-by: Avasam --- distutils/extension.py | 2 +- distutils/tests/test_extension.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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):