(self, name: str, default: bool)
| 862 | return False, {} |
| 863 | |
| 864 | def _get_bool_arg(self, name: str, default: bool) -> bool: |
| 865 | # Expressions are always CallExprs (either directly or via a wrapper like Decorator), so |
| 866 | # we can use the helpers from common |
| 867 | if isinstance(self._reason, Expression): |
| 868 | return _get_decorator_bool_argument( |
| 869 | ClassDefContext(self._cls, self._reason, self._api), name, default |
| 870 | ) |
| 871 | |
| 872 | # Subclass/metaclass use of `typing.dataclass_transform` reads the parameters from the |
| 873 | # class's keyword arguments (ie `class Subclass(Parent, kwarg1=..., kwarg2=...)`) |
| 874 | expression = self._cls.keywords.get(name) |
| 875 | if expression is not None: |
| 876 | return require_bool_literal_argument(self._api, expression, name, default) |
| 877 | return default |
| 878 | |
| 879 | def _get_default_init_value_for_field_specifier(self, call: Expression) -> bool: |
| 880 | """ |
no test coverage detected