Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 30, 2025
1 parent 8d709f9 commit 9b082b2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion geneplexus/_config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

URL_DICT = {
"Zenodo": "https://zenodo.org/records/14750555/files/",
"ZenodoAPI": "https://zenodo.org/api/records/14750555/files/"
"ZenodoAPI": "https://zenodo.org/api/records/14750555/files/",
}

CONFIG_PATH = pathlib.Path(__file__).parent.absolute()
Expand Down
9 changes: 6 additions & 3 deletions geneplexus/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
import shutil
import tarfile
import time
import requests
from typing import List
from typing import Tuple
from typing import Union
from urllib.parse import urljoin
# from . import util

import requests

from ._config import logger
from ._config.config import ALL_SPECIES
from ._config.config import LOG_LEVEL_TYPE
Expand All @@ -22,6 +23,8 @@
from ._config.logger_util import stream_level_context
from .exception import DownloadError

# from . import util


def download_select_data(
data_dir: str,
Expand Down Expand Up @@ -110,7 +113,7 @@ def _download_and_extract(data_dir, file_cat, fn_download, data_loc, num_retries
num_tries += 1
logger.info(f"On attempt {num_tries} of downloading the file")
try:
with requests.get(url, timeout = 2) as r:
with requests.get(url, timeout=2) as r:
if r.ok:
logger.debug(f"Response ok ({r!r}): {url=}")
with tarfile.open(fileobj=io.BytesIO(r.content), mode="r:gz") as tf:
Expand Down

0 comments on commit 9b082b2

Please sign in to comment.