refactor: Move constants outside of variable scope (#7262)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
This commit is contained in:
Caeden
2022-10-16 10:33:29 +01:00
committed by GitHub
parent 7776411621
commit c6582b35bf
17 changed files with 107 additions and 97 deletions

View File

@ -19,6 +19,12 @@ import random
from matplotlib import animation
from matplotlib import pyplot as plt
# Frame rate of the animation
INTERVAL = 20
# Time between time steps in seconds
DELTA_TIME = INTERVAL / 1000
class Body:
def __init__(
@ -219,12 +225,6 @@ def plot(
Utility function to plot how the given body-system evolves over time.
No doctest provided since this function does not have a return value.
"""
# Frame rate of the animation
INTERVAL = 20 # noqa: N806
# Time between time steps in seconds
DELTA_TIME = INTERVAL / 1000 # noqa: N806
fig = plt.figure()
fig.canvas.set_window_title(title)
ax = plt.axes(