Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6e452af

Browse files
Fix lint: move import to top and correct blank lines
Moved HTML import to the top of the file to fix E402 error. Added required blank lines before function definition to fix E302.
1 parent dc10b55 commit 6e452af

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

galleries/users_explain/animations/animations.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717
import matplotlib.pyplot as plt
1818
import numpy as np
19-
2019
import matplotlib.animation as animation
20+
from IPython.display import HTML
2121

2222
# %%
2323
# Animation classes
@@ -140,7 +140,6 @@ def update(frame):
140140
#
141141
# Example:
142142

143-
from IPython.display import HTML
144143

145144
fig, ax = plt.subplots()
146145
x = np.linspace(0, 2*np.pi)
@@ -149,6 +148,7 @@ def update(frame):
149148

150149
FRAMES = 50
151150

151+
152152
def animate(i):
153153
phi = 2 * np.pi * i / FRAMES
154154
line.set_data(x, np.sin(x - phi))

0 commit comments

Comments
 (0)