Skip to content

Commit

Permalink
More type checking fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bsweger committed Oct 1, 2024
1 parent 34d8331 commit f796bac
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ dependencies = [
"rich",
"rich-click",
"structlog",
"us"
"urllib3",
"us",
]

[project.optional-dependencies]
Expand Down Expand Up @@ -63,3 +64,6 @@ lint.extend-select = ["I"]
[tools.setuptools]
packages = ["virus_clade_utils"]

[tool.mypy]
ignore_missing_imports = true

1 change: 1 addition & 0 deletions requirements/requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ tzdata==2024.1
# via pandas
urllib3==2.2.1
# via
# virus-clade-utils (pyproject.toml)
# botocore
# requests
# responses
Expand Down
1 change: 1 addition & 0 deletions requirements/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ tzdata==2024.1
# via pandas
urllib3==2.2.1
# via
# virus-clade-utils (pyproject.toml)
# botocore
# requests
us==3.2.0
Expand Down
2 changes: 1 addition & 1 deletion src/virus_clade_utils/util/sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import polars as pl
import structlog
import us # type: ignore
import us
from requests import Session

from virus_clade_utils.util.reference import _get_s3_object_url
Expand Down
4 changes: 2 additions & 2 deletions src/virus_clade_utils/util/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
import requests
import structlog
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.util.retry import Retry # type: ignore
from urllib3.util import Retry

logger = structlog.get_logger()


def _get_session(session: requests.Session = None) -> requests.Session:
def _get_session() -> requests.Session:
"""Return a requests session with retry logic."""

headers = {
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/test_cladetime.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import dateutil.tz
import pytest
from freezegun import freeze_time
from virus_clade_utils.cladetime import CladeTime # type: ignore
from virus_clade_utils.exceptions import CladeTimeInvalidDateError # type: ignore
from virus_clade_utils.cladetime import CladeTime
from virus_clade_utils.exceptions import CladeTimeInvalidDateError
from virus_clade_utils.util.config import Config


Expand Down

0 comments on commit f796bac

Please sign in to comment.