aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/project/configuration.py
diff options
context:
space:
mode:
authorEgor Tensin <egor@tensin.name>2026-06-23 18:10:36 +0200
committerEgor Tensin <egor@tensin.name>2026-06-23 18:10:36 +0200
commitdb93568d9f8423c4fe6399562f13fa54f7c96494 (patch)
treee5543032f89706d0afb3a3c9f777ba1aa14e2620 /project/configuration.py
parentworkflows/aur: inherit secrets (diff)
downloadcmake-common-db93568d9f8423c4fe6399562f13fa54f7c96494.tar.gz
cmake-common-db93568d9f8423c4fe6399562f13fa54f7c96494.zip
use default settings for Black
Diffstat (limited to 'project/configuration.py')
-rw-r--r--project/configuration.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/project/configuration.py b/project/configuration.py
index ce839a8..78e6eb9 100644
--- a/project/configuration.py
+++ b/project/configuration.py
@@ -8,12 +8,12 @@ from enum import Enum
class Configuration(Enum):
- '''Correspond to CMake's default CMAKE_BUILD_TYPE values.'''
+ """Correspond to CMake's default CMAKE_BUILD_TYPE values."""
- DEBUG = 'Debug'
- MINSIZEREL = 'MinSizeRel'
- RELWITHDEBINFO = 'RelWithDebInfo'
- RELEASE = 'Release'
+ DEBUG = "Debug"
+ MINSIZEREL = "MinSizeRel"
+ RELWITHDEBINFO = "RelWithDebInfo"
+ RELEASE = "Release"
def __str__(self):
return str(self.value)
@@ -27,22 +27,22 @@ class Configuration(Enum):
try:
return Configuration(s)
except ValueError as e:
- raise argparse.ArgumentTypeError(f'invalid configuration: {s}') from e
+ raise argparse.ArgumentTypeError(f"invalid configuration: {s}") from e
def b2_variant(self):
- '''Roughly maps CMake's CMAKE_BUILD_TYPE to Boost's variant.
+ """Roughly maps CMake's CMAKE_BUILD_TYPE to Boost's variant.
AFAIK, Boost only supports debug/release, MinSizeRel and RelWithDebInfo
are hence mapped to "release". The libraries will still reside in
install_dir/PLATFORM/CONFIGURATION/lib, if CONFIGURATION is
MinSizeRel/RelWithDebInfo.
- '''
+ """
if self in (Configuration.MINSIZEREL, Configuration.RELWITHDEBINFO):
return Configuration.RELEASE.b2_variant()
return str(self).lower()
def b2_args(self):
- return [f'variant={self.b2_variant()}']
+ return [f"variant={self.b2_variant()}"]
def cmake_args(self):
- return [f'-DCMAKE_BUILD_TYPE={self}']
+ return [f"-DCMAKE_BUILD_TYPE={self}"]