Skip to content

Commit

Permalink
Devops: Use Python 3.10 for pre-commit in CI and CD workflows (#6121)
Browse files Browse the repository at this point in the history
  • Loading branch information
sphuber authored Sep 13, 2023
1 parent 5dda6fd commit f41c8ac
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Set up Python 3.9
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: '3.9'
python-version: '3.10'

- name: Install system dependencies
# note libkrb5-dev is required as a dependency for the gssapi pip install
Expand All @@ -30,7 +30,7 @@ jobs:
- name: Install python dependencies
run: |
pip install --upgrade pip
pip install -r requirements/requirements-py-3.9.txt
pip install -r requirements/requirements-py-3.10.txt
pip install -e .[pre-commit]
pip freeze
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: '3.9'
python-version: '3.10'
- name: Install system dependencies
# note libkrb5-dev is required as a dependency for the gssapi pip install
run: |
Expand All @@ -45,7 +45,7 @@ jobs:
- name: Install python dependencies
run: |
pip install --upgrade pip
pip install -r requirements/requirements-py-3.9.txt
pip install -r requirements/requirements-py-3.10.txt
pip install -e .[pre-commit]
pip freeze
- name: Run pre-commit
Expand Down
2 changes: 1 addition & 1 deletion aiida/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def get_strict_version():
:returns: StrictVersion instance with the current version
:rtype: :class:`!distutils.version.StrictVersion`
"""
from distutils.version import StrictVersion
from distutils.version import StrictVersion # pylint: disable=deprecated-module

from aiida.common.warnings import warn_deprecation
warn_deprecation(
Expand Down
8 changes: 4 additions & 4 deletions aiida/engine/processes/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,16 @@
from .process import Process

try:
UnionType = types.UnionType # type: ignore[attr-defined]
UnionType = types.UnionType
except AttributeError:
# This type is not available for Python 3.9 and older
UnionType = None # pylint: disable=invalid-name
UnionType = None # type: ignore[assignment,misc] # pylint: disable=invalid-name

try:
get_annotations = inspect.get_annotations # type: ignore[attr-defined]
get_annotations = inspect.get_annotations
except AttributeError:
# This is the backport for Python 3.9 and older
from get_annotations import get_annotations # type: ignore[no-redef]
from get_annotations import get_annotations # type: ignore[no-redef] # pylint: disable=import-error

if TYPE_CHECKING:
from .exit_code import ExitCode
Expand Down

0 comments on commit f41c8ac

Please sign in to comment.