Return the boolean value for an argument to a call or the default if it's not found.
(ctx: ClassDefContext, expr: CallExpr, name: str, default: bool)
| 64 | |
| 65 | |
| 66 | def _get_bool_argument(ctx: ClassDefContext, expr: CallExpr, name: str, default: bool) -> bool: |
| 67 | """Return the boolean value for an argument to a call or the |
| 68 | default if it's not found. |
| 69 | """ |
| 70 | attr_value = _get_argument(expr, name) |
| 71 | if attr_value: |
| 72 | return require_bool_literal_argument(ctx.api, attr_value, name, default) |
| 73 | return default |
| 74 | |
| 75 | |
| 76 | def _get_argument(call: CallExpr, name: str) -> Expression | None: |
no test coverage detected
searching dependent graphs…