Skip to content

Commit

Permalink
Fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
vid512 committed Jan 5, 2025
1 parent e845780 commit 6c6d022
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mesonbuild/dependencies/dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ def _has_define(compiler: 'Compiler', dname: str, env: 'Environment') -> bool:
# We can find this path from the build environment of msvc-wine.
# msvc-wine can be used in two different ways:
@staticmethod
def _find_msvc_wine_path(compiler: 'Compiler'):
def _find_msvc_wine_path(compiler: 'Compiler') -> T.Optional[str]:
mlog.debug('looking for msvc-wine')

# One way adds <msvc>/bin/x64 to PATH. From there user executes 'cl' script,
Expand Down Expand Up @@ -790,11 +790,11 @@ def _find_msvc_wine_path(compiler: 'Compiler'):
if includes is None:
mlog.debug('- INCLUDES not defined')
return None
winrt = next((i for i in includes.split(';') if i.endswith('/winrt')), None)
if winrt is None:
winrt_inc = next((i for i in includes.split(';') if i.endswith('/winrt')), None)
if winrt_inc is None:
mlog.debug(f'- winrt include not found in INCLUDES: {includes}')
return None
winrt = pathlib.Path(winrt)
winrt = pathlib.Path(winrt_inc)
if winrt.parents[1].name != 'include' or winrt.parents[3].name != 'kits':
mlog.debug(f'- winrt path does not look like msvc-wine: {winrt}')
return None
Expand Down

0 comments on commit 6c6d022

Please sign in to comment.