diff --git a/src/lksearch/K2Search.py b/src/lksearch/K2Search.py index cd4c86a..5780e11 100644 --- a/src/lksearch/K2Search.py +++ b/src/lksearch/K2Search.py @@ -7,7 +7,6 @@ from astropy.coordinates import SkyCoord from .MASTSearch import MASTSearch -from . import log pd.options.display.max_rows = 10 diff --git a/src/lksearch/KeplerSearch.py b/src/lksearch/KeplerSearch.py index ffe514a..5a33cfc 100644 --- a/src/lksearch/KeplerSearch.py +++ b/src/lksearch/KeplerSearch.py @@ -8,7 +8,7 @@ from astropy.coordinates import SkyCoord from .MASTSearch import MASTSearch -from . import PACKAGEDIR, log +from . import PACKAGEDIR pd.options.display.max_rows = 10 diff --git a/src/lksearch/MASTSearch.py b/src/lksearch/MASTSearch.py index d6f76bf..5319975 100644 --- a/src/lksearch/MASTSearch.py +++ b/src/lksearch/MASTSearch.py @@ -89,9 +89,9 @@ def __init__( pipeline = np.atleast_1d(pipeline).tolist() self.search_pipeline = pipeline - if ("kepler" in (m.lower() for m in mission)) & (sequence != None): + if ("kepler" in (m.lower() for m in mission)) & (sequence is not None): log.warning( - f"Sequence not valid when searching for Kepler data. Setting sequence to None" + "Sequence not valid when searching for Kepler data. Setting sequence to None" ) sequence = None @@ -213,7 +213,7 @@ def uris(self): if conf.PREFER_CLOUD: cloud_uris = self.cloud_uris - mask = cloud_uris != None + mask = cloud_uris is not None uris[mask] = cloud_uris[mask] return uris @@ -583,7 +583,7 @@ def _search_obs( if filetype == "ffi": raise SearchError( - f"FFI search not implemented in MASTSearch. Please use TESSSearch." + "FFI search not implemented in MASTSearch. Please use TESSSearch." ) # Ensure mission is a list diff --git a/src/lksearch/__init__.py b/src/lksearch/__init__.py index d049a76..3d2789e 100644 --- a/src/lksearch/__init__.py +++ b/src/lksearch/__init__.py @@ -1,7 +1,7 @@ #!/usr/bin/env python from __future__ import absolute_import from . import config as _config -from .version import __version__ +from .version import __version__ #noqa import os import logging @@ -81,8 +81,7 @@ class Conf(_config.ConfigNamespace): conf = Conf() -from .MASTSearch import MASTSearch -from .TESSSearch import TESSSearch -from .KeplerSearch import KeplerSearch -from .K2Search import K2Search -from .io import * +from .MASTSearch import MASTSearch #noqa +from .TESSSearch import TESSSearch #noqa +from .KeplerSearch import KeplerSearch #noqa +from .K2Search import K2Search #noqa diff --git a/src/lksearch/config/__init__.py b/src/lksearch/config/__init__.py index 0586a8d..10d5203 100644 --- a/src/lksearch/config/__init__.py +++ b/src/lksearch/config/__init__.py @@ -2,11 +2,12 @@ import warnings import glob import shutil +import logging import astropy.config as _config ROOTNAME = "lksearch" - +log = logging.getLogger(ROOTNAME) class ConfigNamespace(_config.ConfigNamespace): rootname = ROOTNAME