Skip to content

Commit

Permalink
fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
sherlyn99 committed Sep 5, 2024
1 parent 96b1e85 commit ae6f868
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions micov/_utils.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import logging


def configure_logging():
logger = logging.getLogger("micov")
logger.setLevel(logging.INFO)
# Check if the logger already has handlers (prevents adding multiple handlers)
if not logger.hasHandlers():
handler = logging.StreamHandler()
formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s: %(message)s")
formatter = logging.Formatter(
"%(asctime)s - %(name)s - %(levelname)s: %(message)s"
)
handler.setFormatter(formatter)
logger.addHandler(handler)
return logger
return logger
4 changes: 2 additions & 2 deletions micov/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ def compress(data, output, disable_compression, lengths, taxonomy):
taxonomy = parse_taxonomy(taxonomy)

if os.path.isdir(data):
file_list = (glob(data + "/*.sam")
+ glob(data + '/*.sam.xz')
file_list = (glob(data + "/*.sam")
+ glob(data + '/*.sam.xz')
+ glob(data + '/*.sam.gz'))
else:
file_list = [data]
Expand Down

0 comments on commit ae6f868

Please sign in to comment.