From a7e06fc7e8a9aec2916f218027b8d572d8167099 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Thu, 6 May 2021 23:11:52 +0300 Subject: fix PyLint warnings --- project/boost/download.py | 1 + project/boost/toolchain.py | 15 +++++++-------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/project/boost/download.py b/project/boost/download.py index d13b63e..3f1366e 100644 --- a/project/boost/download.py +++ b/project/boost/download.py @@ -80,6 +80,7 @@ class Download: except urllib.request.URLError as e: logging.error("Couldn't download from this mirror, an error occured:") logging.exception(e) + return None def _try_urls(self): urls = self.version.get_download_urls() diff --git a/project/boost/toolchain.py b/project/boost/toolchain.py index 2ff409f..5fa2043 100644 --- a/project/boost/toolchain.py +++ b/project/boost/toolchain.py @@ -43,18 +43,17 @@ class Toolchain(abc.ABC): def detect(hint): if hint is ToolchainType.AUTO: return Auto - elif hint is ToolchainType.MSVC: + if hint is ToolchainType.MSVC: return MSVC - elif hint is ToolchainType.GCC: + if hint is ToolchainType.GCC: return GCC - elif hint is ToolchainType.MINGW: + if hint is ToolchainType.MINGW: return MinGW - elif hint is ToolchainType.CLANG: + if hint is ToolchainType.CLANG: return Clang - elif hint is ToolchainType.CLANG_CL: + if hint is ToolchainType.CLANG_CL: return ClangCL - else: - raise NotImplementedError(f'unrecognized toolset: {hint}') + raise NotImplementedError(f'unrecognized toolset: {hint}') @staticmethod def make(hint, platform): @@ -173,7 +172,7 @@ class GCC(Custom): @staticmethod def get_bootstrap_sh_args(): - return [f'--with-toolset=gcc'] + return ['--with-toolset=gcc'] @staticmethod def get_build_options(): -- cgit v1.2.3