Skip to content

Commit

Permalink
Cleanup: remove dependency from dynamic code to global state.
Browse files Browse the repository at this point in the history
  • Loading branch information
jayaddison committed Mar 27, 2024
1 parent 3a48020 commit 01792ea
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pywisetransfer/deprecation.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def __init__(self, *args, **kwargs):
orig, args = args[0], args[1:]
exec(
f"""
class deprecated(deprecated):
class deprecated:
@staticmethod
def {orig.__name__}(*args, **kwargs):
self._emit_warning()
Expand All @@ -30,7 +30,6 @@ def {orig.__name__}(*args, **kwargs):
self.f = deprecated.{orig.__name__}
""",
locals(),
globals(),
)
self.message = self._message(*args, **kwargs)

Expand Down

0 comments on commit 01792ea

Please sign in to comment.