diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2020-03-04 13:23:05 -0800 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2020-03-05 09:58:52 -0800 |
commit | 6329393db544ec408dc004d4c7be427539375f66 (patch) | |
tree | 27631b2002abea13c9931af8fec7627c66ee152f /mesonbuild/dependencies/boost.py | |
parent | 08797e13d9cdc5eaff3e16a816252e87eaa66057 (diff) | |
download | meson-6329393db544ec408dc004d4c7be427539375f66.zip meson-6329393db544ec408dc004d4c7be427539375f66.tar.gz meson-6329393db544ec408dc004d4c7be427539375f66.tar.bz2 |
dependencies/boost: Fix a number of mypy issues
Since mypy can now see type information for mesonlib it can determine a
number of potential errors in the boost module, this fixes those.
Diffstat (limited to 'mesonbuild/dependencies/boost.py')
-rw-r--r-- | mesonbuild/dependencies/boost.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/mesonbuild/dependencies/boost.py b/mesonbuild/dependencies/boost.py index b07f3ac..d083672 100644 --- a/mesonbuild/dependencies/boost.py +++ b/mesonbuild/dependencies/boost.py @@ -299,9 +299,9 @@ class BoostDependency(ExternalDependency): mlog.debug(' - BOOST_LIBRARYDIR = {}'.format(lib_dir)) boost_inc_dir = None - for i in [inc_dir / 'version.hpp', inc_dir / 'boost' / 'version.hpp']: - if i.is_file(): - boost_inc_dir = self._include_dir_from_version_header(i) + for j in [inc_dir / 'version.hpp', inc_dir / 'boost' / 'version.hpp']: + if j.is_file(): + boost_inc_dir = self._include_dir_from_version_header(j) break if not boost_inc_dir: self.is_found = False @@ -317,20 +317,20 @@ class BoostDependency(ExternalDependency): roots = list(mesonlib.OrderedSet(roots)) # B) Foreach candidate - for i in roots: + for j in roots: # 1. Look for the boost headers (boost/version.pp) - mlog.debug('Checking potential boost root {}'.format(i.as_posix())) - inc_dirs = self.detect_inc_dirs(i) + mlog.debug('Checking potential boost root {}'.format(j.as_posix())) + inc_dirs = self.detect_inc_dirs(j) inc_dirs = sorted(inc_dirs, reverse=True) # Prefer the newer versions # Early abort when boost is not found if not inc_dirs: continue - lib_dirs = self.detect_lib_dirs(i) + lib_dirs = self.detect_lib_dirs(j) self.is_found = self.run_check(inc_dirs, lib_dirs) if self.is_found: - self.boost_root = i + self.boost_root = j break def run_check(self, inc_dirs: T.List[BoostIncludeDir], lib_dirs: T.List[Path]) -> bool: |