-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ENH, TST: aux func for importing optional deps * ENH: use our new helper func for importing optional deps * FIX: use aux func for a few more cftime imports * FIX: remove cruft.... * FIX: Make it play well with mypy Per the proposal at #9561 (comment) This pairs any use of (a now simplified) `attempt_import` with a direct import of the same module, guarded by an `if TYPE_CHECKING` block. * FIX, TST: match error * Update xarray/tests/test_utils.py Co-authored-by: Michael Niklas <mick.niklas@gmail.com> * DOC: add examples section to docstring * refactor: use try-except clause and return original error to user - Also change raise ImportError to raise RuntimeError, since we are catching both ImportError and ModuleNotFoundError * TST: test import of submodules * FIX: Incorporate @headtr1ck suggetsions From #9561 (comment) #9561 (comment) --------- Co-authored-by: Deepak Cherian <dcherian@users.noreply.github.com> Co-authored-by: Michael Niklas <mick.niklas@gmail.com>
- Loading branch information
1 parent
700191b
commit 339ed93
Showing
10 changed files
with
183 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.