Skip to content

Commit

Permalink
fixing ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
christinahedges committed Jul 26, 2024
1 parent 7936990 commit 37356e7
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
1 change: 0 additions & 1 deletion src/lksearch/K2Search.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from astropy.coordinates import SkyCoord

from .MASTSearch import MASTSearch
from . import log

pd.options.display.max_rows = 10

Expand Down
2 changes: 1 addition & 1 deletion src/lksearch/KeplerSearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 4 additions & 4 deletions src/lksearch/MASTSearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
11 changes: 5 additions & 6 deletions src/lksearch/__init__.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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
3 changes: 2 additions & 1 deletion src/lksearch/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 37356e7

Please sign in to comment.