Skip to content
This repository has been archived by the owner on Sep 3, 2024. It is now read-only.

Commit

Permalink
Migrate to Python 3.12 (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sinclert authored Oct 3, 2023
1 parent 2b78b40 commit 07231d4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: "Set up Python"
uses: actions/setup-python@v4
with:
python-version: "3.11"
python-version: "3.12"
- name: "Set up private packages SSH keys"
uses: webfactory/[email protected]
with:
Expand All @@ -56,7 +56,7 @@ jobs:
- name: "Set up Python"
uses: actions/setup-python@v4
with:
python-version: "3.11"
python-version: "3.12"
- name: "Set up private packages SSH keys"
uses: webfactory/[email protected]
with:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Base image
FROM python:3.11-slim
FROM python:3.12-slim

# Set working directory
WORKDIR /app
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[tool.black]
line-length = 100
target-version = ['py311']
target-version = ['py312']
include = '\.pyi?$'
exclude = '''
(
Expand Down
3 changes: 3 additions & 0 deletions src/api/config/loaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from abc import ABC
from abc import abstractmethod
from typing import Any
from typing import override


class ConfigLoader(ABC):
Expand Down Expand Up @@ -50,6 +51,7 @@ def _parse_value(data_type: type, name: str, default: Any) -> Any:
value = data_type(value)
return value

@override
def load_argument(self, data_type: type, name: str, default: Any) -> Any:
"""
Loads a single argument from the OS env.
Expand All @@ -61,6 +63,7 @@ def load_argument(self, data_type: type, name: str, default: Any) -> Any:

return self._parse_value(data_type, name, default)

@override
def load_arguments(self, args: dict | tuple) -> dict:
"""
Recursive function to load multiple arguments from the OS env.
Expand Down

0 comments on commit 07231d4

Please sign in to comment.