Skip to content

Commit

Permalink
add deprecation warning type and fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
hammy4815 committed Dec 15, 2022
1 parent a2b24c5 commit 830aeea
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions python/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -1019,13 +1019,14 @@ def add_source(self, sim):

class GaussianBeamSource(GaussianBeam3DSource):
"""
Wrapper for GaussianBeam3DSource to warn the user when running 2D simulations that this behavior is depricated and they should be using GaussianBeam2DSource.
Wrapper for GaussianBeam3DSource to warn the user when running 2D simulations that this behavior is deprecated and they should be using GaussianBeam2DSource.
"""

def add_source(self, sim):
if sim.dimensions == 2:
warnings.warn(
"GaussianBeamSource is depricated for 2D simulations. For more accurate results, use GaussianBeam2DSource instead. In the future, this will be the default behavior."
"GaussianBeamSource is deprecated for 2D simulations. For more accurate results, use GaussianBeam2DSource instead. In the future, this will be the default behavior.",
DeprecationWarning,
)
super().add_source(sim)

Expand Down

0 comments on commit 830aeea

Please sign in to comment.