Skip to content

Commit df35414

Browse files
committed
MAINT: make mypy happy not redefining a variable to a different type
1 parent 02df049 commit df35414

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
@@ -844,8 +844,8 @@ def __init__(
844844
if self._limited_api:
845845
# check whether limited API is disabled for the Meson project
846846
options = self._info('intro-buildoptions')
847-
value = next((option['value'] for option in options if option['name'] == 'python.allow_limited_api'), None)
848-
if not value:
847+
allow_limited_api = next((opt['value'] for opt in options if opt['name'] == 'python.allow_limited_api'), None)
848+
if not allow_limited_api:
849849
self._limited_api = False
850850

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

0 commit comments

Comments
 (0)