Skip to content

Commit

Permalink
add deprecation warning to 'sim' arg in Animate2D
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasdorch committed Oct 11, 2022
1 parent bff8b9a commit ea06b8f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion python/visualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -1106,7 +1106,7 @@ def __init__(
"""
Construct an `Animate2D` object.
+ **`sim=None`** — Optional Simulation object (this has no effect but is included for backwards compatibility).
+ **`sim=None`** — Optional Simulation object (this has no effect, and is included for backwards compatibility).
+ **`fields=None`** — Optional Field component to record at each time instant.
Expand Down Expand Up @@ -1141,6 +1141,11 @@ def mod1(ax):
+ **`**customization_args`** — Customization keyword arguments passed to
`plot2D()` (i.e. `labels`, `eps_parameters`, `boundary_parameters`, etc.)
"""
if sim is not None:
warnings.warn(
"Warning: The 'sim' argument in Animate2D is deprecated and has no effect. It will be removed "
"in a future release."
)

self.fields = fields
self.update_epsilon = update_epsilon
Expand Down

0 comments on commit ea06b8f

Please sign in to comment.