Skip to content

Commit d38d651

Browse files
committed
chore(chart): Removed unnecessary variable declaration
1 parent f109ba0 commit d38d651

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

chart/function/create_chart.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,20 +56,16 @@ async def create_chart(currency: Currency, db: Database) -> Optional[BytesIO]:
5656
x_values = np.arange(len(dates))
5757
try:
5858
spline = make_interp_spline(x_values, rates, k=2)
59-
except ValueError as e:
59+
except ValueError:
6060
return None
6161

62-
x_values = np.arange(len(dates))
63-
spline = make_interp_spline(x_values, rates, k=2)
6462
new_x = np.linspace(0, len(dates) - 1, 200)
6563
new_y = spline(new_x)
6664

6765
fig, ax = plt.subplots(figsize=(15, 6))
6866

6967
ax.set_xticks(np.linspace(0, len(dates) - 1, 10))
70-
7168
current_year = datetime.now().year
72-
7369
ax.set_xticklabels(
7470
[
7571
dates[int(i)].strftime('%m-%d')

0 commit comments

Comments
 (0)