Skip to content

Commit

Permalink
Upgrade mypy, docs with py38
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhollas committed Nov 17, 2024
1 parent 2e49092 commit b3eba93
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.7'
python-version: '3.8'

- name: Set up uv
uses: astral-sh/setup-uv@v3
Expand Down
2 changes: 1 addition & 1 deletion aiida_testing/_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def validate(self):
return self.schema(self._dict)

@classmethod
def from_file(cls):
def from_file(cls) -> 'Config':
"""
Parses the configuration file ``.aiida-testing-config.yml``.
Expand Down
10 changes: 6 additions & 4 deletions aiida_testing/archive_cache/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,11 @@ def import_with_migrate(
raise

except ImportError:
from aiida.tools.importexport import export as create_archive #type: ignore[import,no-redef]
from aiida.tools.importexport import import_data as import_archive #type: ignore[no-redef]
import_archive = partial(import_archive, extras_mode_existing='ncu', extras_mode_new='import')
from aiida.tools.importexport import export as create_archive # type: ignore[import-not-found,no-redef]
from aiida.tools.importexport import import_data as import_archive # type: ignore[no-redef]
import_archive = partial(
import_archive, extras_mode_existing='ncu', extras_mode_new='import'
) # type: ignore[call-arg]

def import_with_migrate(
archive_path: ty.Union[str, pathlib.Path],
Expand All @@ -133,7 +135,7 @@ def import_with_migrate(
from aiida.tools.importexport import EXPORT_VERSION, IncompatibleArchiveVersionError
# these are only availbale after aiida >= 1.5.0, maybe rely on verdi import instead
from aiida.tools.importexport import detect_archive_type
from aiida.tools.importexport.archive.migrators import get_migrator #type: ignore[import]
from aiida.tools.importexport.archive.migrators import get_migrator # type: ignore[import-not-found]

try:
import_archive(archive_path, *args, **kwargs)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ testing = [
pre_commit = [
"pre-commit",
"pylint~=2.12.2",
"mypy==0.930",
"mypy==1.13",
"types-setuptools==65.7.0.3",
"types-PyYAML",
]
Expand Down

0 comments on commit b3eba93

Please sign in to comment.