> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sourcery.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Boolean If Expression Identity

#### Sourcery refactoring id: `boolean-if-exp-identity`

#### Description:

Simplifies boolean if expressions by removing unnecessary explicit references to
`True` or `False` states

#### Before:

```python
some_var = True if some_boolean_expression else False
```

#### After:

```python
some_var = some_boolean_expression
```

#### Explanation:

Rather than using an if-expression to evaluate a boolean, you can just use it
directly. This is shorter and clearer - if expressions of this form take a while
to mentally parse.

Where Sourcery cannot determine if the expression is a boolean it will wrap it
in a call to`bool()`.
