> ## 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.

# Remove Redundant Condition

#### Sourcery refactoring id: `remove-redundant-condition`

#### Description:

Remove a redundant condition used during variable assignment

#### Before:

```python
x = y if z else y
```

#### After:

```python
x = y
```

#### Explanation:

Code may contain redundant statements where a condition is unnecessarily
evaluated, and the result will be the same either way. This refactoring detects
such redundancy and removes it.
