Skip to content

Commit 62f0d60

Browse files
authored
added newline and comment
I fixed the sorting of the imports and I added a comment to the plot-function to explain what it does and why it doesn't use a doctest. Thank you to user mrmaxguns for suggesting these changes.
1 parent 526f49d commit 62f0d60

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

other/koch_snowflake.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323

2424
from __future__ import annotations
25+
2526
import numpy
2627

2728

@@ -91,7 +92,12 @@ def rotate(vector: numpy.ndarray, angle_in_degrees: float) -> numpy.ndarray:
9192

9293

9394
def plot(vectors: list[numpy.ndarray]) -> None:
94-
import matplotlib.pyplot as plt # type: ignore
95+
"""
96+
Utility function to plot the vectors using matplotlib.pyplot
97+
No doctest was implemented since this function does not have a return value
98+
"""
99+
import matplotlib.pyplot.
100+
as plt # type: ignore
95101

96102
# avoid stretched display of graph
97103
axes = plt.gca()

0 commit comments

Comments
 (0)