From 2837204c7a69c643376439bc7c5249e1eca2b6c2 Mon Sep 17 00:00:00 2001 From: "P. L. Lim" <2090236+pllim@users.noreply.github.com> Date: Fri, 9 Apr 2021 20:02:47 -0400 Subject: [PATCH] MNT: Remove unused astropy config code --- imexam/_astropy_init.py | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/imexam/_astropy_init.py b/imexam/_astropy_init.py index 1e229e19..d7a772d0 100644 --- a/imexam/_astropy_init.py +++ b/imexam/_astropy_init.py @@ -25,36 +25,9 @@ if not _ASTROPY_SETUP_: # noqa import os - from warnings import warn - from astropy.config.configuration import ( - update_default_config, - ConfigurationDefaultMissingError, - ConfigurationDefaultMissingWarning) # Create the test function for self test from astropy.tests.runner import TestRunner test = TestRunner.make_test_runner_in(os.path.dirname(__file__)) test.__test__ = False __all__ += ['test'] - - # add these here so we only need to cleanup the namespace at the end - config_dir = None - - if not os.environ.get('ASTROPY_SKIP_CONFIG_UPDATE', False): - config_dir = os.path.dirname(__file__) - config_template = os.path.join(config_dir, __package__ + ".cfg") - if os.path.isfile(config_template): - try: - update_default_config( - __package__, config_dir, version=__version__) - except TypeError as orig_error: - try: - update_default_config(__package__, config_dir) - except ConfigurationDefaultMissingError as e: - wmsg = (e.args[0] + - " Cannot install default profile. If you are " - "importing from source, this is expected.") - warn(ConfigurationDefaultMissingWarning(wmsg)) - del e - except Exception: - raise orig_error