> ## 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-None-From-Default-Get

#### Sourcery rule id: `remove-none-from-default-get`

#### Description

Replace `dict.get(x, None)` with `dict.get(x)`


#### Before

```python
hats = {"bowler": Bowler(), "sombrero": Sombrero()}
fedora = hats.get("fedora", None)
```

#### After

```python
hats = {"bowler": Bowler(), "sombrero": Sombrero()}
fedora = hats.get("fedora")
```



#### Explanation

When using a dictionary's `get` method you can specify a default to return if
the key is not found. This defaults to `None`, so it is unnecessary to specify
`None` if this is the required behaviour. Removing the unnecessary argument
makes the code slightly shorter and clearer.
