Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up util imports #7561

Merged
merged 1 commit into from
May 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 4 additions & 3 deletions sunpy/util/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
from inspect import Parameter, signature
from functools import wraps

import astropy.units as u
from astropy.nddata import NDData

from sunpy.util.exceptions import SunpyDeprecationWarning, SunpyPendingDeprecationWarning, warn_deprecated

__all__ = ['deprecated']
Expand Down Expand Up @@ -388,6 +385,10 @@ def check_arithmetic_compatibility(func):
A decorator to check if an arithmetic operation can
be performed between a map instance and some other operation.
"""
# import here to reduce import complexity of `import sunpy`
import astropy.units as u
from astropy.nddata import NDData

@wraps(func)
def inner(instance, value):
# This is explicit because it is expected that users will try to do this. This raises
Expand Down