We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 1d120d9 + 55ccc6a commit fee62caCopy full SHA for fee62ca
distutils/compilers/C/base.py
@@ -236,8 +236,11 @@ def _check_macro_definition(self, defn):
236
def _is_valid_macro(name, value=None):
237
"""
238
A valid macro is a ``name : str`` and a ``value : str | None``.
239
+
240
+ >>> Compiler._is_valid_macro('foo', None)
241
+ True
242
- return isinstance(name, str) and isinstance(value, (str, None))
243
+ return isinstance(name, str) and isinstance(value, (str, type(None)))
244
245
# -- Bookkeeping methods -------------------------------------------
246
0 commit comments