diff options
| author | Dylan Baker <dylan@pnwbakers.com> | 2025-03-03 10:40:17 -0800 |
|---|---|---|
| committer | Jussi Pakkanen <jpakkane@gmail.com> | 2025-03-05 18:06:11 +0200 |
| commit | c227f38560dba23b606ff3336def167c1506283d (patch) | |
| tree | 97520bda13219afb035315e08cb64564d955cb6d /mesonbuild/options.py | |
| parent | fbed6e9bd6569b98a9dcdfccf4ae72d0c791111a (diff) | |
| download | meson-c227f38560dba23b606ff3336def167c1506283d.tar.gz | |
options: remove BuiltinOption._argparse_choices
Since ba3460eb11bbceaf4fef7352bf286cf27184c99a, the workaround this was
applying was unnecessary.
Diffstat (limited to 'mesonbuild/options.py')
| -rw-r--r-- | mesonbuild/options.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/mesonbuild/options.py b/mesonbuild/options.py index c3f2ff36a..78d2bef53 100644 --- a/mesonbuild/options.py +++ b/mesonbuild/options.py @@ -672,11 +672,6 @@ class BuiltinOption(T.Generic[_T]): return 'store_true' return None - def _argparse_choices(self) -> T.Any: - if self.opt_type is UserBooleanOption: - return [True, False] - return self.choices - @staticmethod def argparse_name_to_arg(name: str) -> str: if name == 'warning_level': @@ -696,7 +691,7 @@ class BuiltinOption(T.Generic[_T]): def add_to_argparse(self, name: OptionKey, parser: argparse.ArgumentParser, help_suffix: str) -> None: kwargs: ArgparseKWs = {} - c = self._argparse_choices() + c = self.choices b = self._argparse_action() h = self.description if not b: |
