diff options
| author | Egor Tensin <egor@tensin.name> | 2026-03-30 10:18:37 +0200 |
|---|---|---|
| committer | Egor Tensin <egor@tensin.name> | 2026-03-30 10:18:37 +0200 |
| commit | d4ea34cc8191f7e669ff4f4166dc57723c4d7b90 (patch) | |
| tree | 6ca9d65b54aab3c90d5745830b1f1500f0c60298 /project | |
| parent | examples: finalize the removal of common.cmake (diff) | |
| download | cmake-common-d4ea34cc8191f7e669ff4f4166dc57723c4d7b90.tar.gz cmake-common-d4ea34cc8191f7e669ff4f4166dc57723c4d7b90.zip | |
fix PyLint warnings
Diffstat (limited to 'project')
| -rw-r--r-- | project/boost/download.py | 1 | ||||
| -rw-r--r-- | project/build.py | 2 | ||||
| -rw-r--r-- | project/platform.py | 2 | ||||
| -rw-r--r-- | project/toolset.py | 4 |
4 files changed, 4 insertions, 5 deletions
diff --git a/project/boost/download.py b/project/boost/download.py index 8e57406..aee80dc 100644 --- a/project/boost/download.py +++ b/project/boost/download.py @@ -101,7 +101,6 @@ class Download: reply = self._try_urls() with self.storage.write_archive(self.version, reply) as path: yield path - return @contextmanager def download_if_necessary(self): diff --git a/project/build.py b/project/build.py index fe7fbdc..984bf0e 100644 --- a/project/build.py +++ b/project/build.py @@ -237,7 +237,7 @@ def _parse_args(argv=None): parser.add_argument('src_dir', type=normalize_path, help='source directory') parser.add_argument('build_dir', type=normalize_path, nargs='?', - help=f"build directory (a temporary directory if omitted)") + help='build directory (a temporary directory if omitted)') return parser.parse_args(argv) diff --git a/project/platform.py b/project/platform.py index 51dac2c..fa0a7d3 100644 --- a/project/platform.py +++ b/project/platform.py @@ -36,7 +36,7 @@ class Platform(Enum): @staticmethod def all(): - return Platform.X86, Platform.X64, + return Platform.X86, Platform.X64 @staticmethod def parse(s): diff --git a/project/toolset.py b/project/toolset.py index 272cebe..2a9d797 100644 --- a/project/toolset.py +++ b/project/toolset.py @@ -79,8 +79,8 @@ class MSVCVersion(Enum): def to_boost_msvc_version(self): try: numeric = int(self.value) - except ValueError: - raise RuntimeError(f'what? MSVC versions are supposed to be integers: {self.value}') + except ValueError as e: + raise RuntimeError(f'what? MSVC versions are supposed to be integers: {self.value}') from e numeric = Decimal(numeric) / 10 numeric = numeric.quantize(Decimal('1.0')) return str(numeric) |
