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

# Simplify Numeric Comparison

#### Sourcery refactoring id: `simplify-numeric-comparison`

#### Description:

Consolidates any mathematical operations in a numeric comparison so there is a
direct comparison of variable to number

#### Before:

```python
if a + 1 < 2:
    do_x()
```

#### After:

```python
if a < 1:
    do_x()
```

#### Explanation:

This refactoring removes unnecessary clutter from the code and makes it easier
to determine what a variable is being compared to.
