> ## 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 Str From Fstring

#### Sourcery refactoring id: `remove-str-from-fstring`

#### Description

Remove unnecessary calls to `str()` within formatted values in f-strings

#### Before

```python
def description(name: str, age: int):
    return f"Name: {str(name)}, Age: {str(age)}"
```

#### After

```python
def description(name: str, age: int):
    return f"Name: {name}, Age: {age}"
```

#### Explanation

Calls to `str()` are normally unnecessary within the formatted values of
f-strings, since this conversion is already implicitly made. Removing them
tidies up the code slightly and will yield a small performance improvement. You
do need to call `str()` on some types with custom `__repr__()` methods, so this
refactoring only triggers where Sourcery has inferred the type to be suitable.
