Skip to content

Commit 1cfeab1

Browse files
committed
MAINT: make mypy happy not redefining a variable to a different type
1 parent efaefaa commit 1cfeab1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mesonpy/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -838,8 +838,8 @@ def __init__(
838838
if self._limited_api:
839839
# check whether limited API is disabled for the Meson project
840840
options = self._info('intro-buildoptions')
841-
value = next((option['value'] for option in options if option['name'] == 'python.allow_limited_api'), None)
842-
if not value:
841+
allow_limited_api = next((opt['value'] for opt in options if opt['name'] == 'python.allow_limited_api'), None)
842+
if not allow_limited_api:
843843
self._limited_api = False
844844

845845
if self._limited_api and bool(sysconfig.get_config_var('Py_GIL_DISABLED')):

0 commit comments

Comments
 (0)