Skip to content

Commit

Permalink
Merge pull request #7561 from Cadair/import_util
Browse files Browse the repository at this point in the history
Clean up util imports
  • Loading branch information
nabobalis committed May 15, 2024
2 parents d61e76e + 8ac4be3 commit daf6833
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions sunpy/util/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@

import numpy as np

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

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

__all__ = ['deprecated','sunpycontextmanager', 'active_contexts']
Expand Down Expand Up @@ -390,6 +387,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

0 comments on commit daf6833

Please sign in to comment.