Use python 3.10 and fix types
This commit is contained in:
parent
11afd70979
commit
470f03dd07
4 changed files with 7 additions and 6 deletions
|
|
@ -1 +1 @@
|
||||||
3.9.7
|
3.10.5
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
ARG PYTHON_VERSION=3.9
|
ARG PYTHON_VERSION=3.10
|
||||||
FROM docker.io/python:${PYTHON_VERSION}-alpine as builder
|
FROM docker.io/python:${PYTHON_VERSION}-alpine as builder
|
||||||
ARG LIBOLM_VERSION=3.2.10
|
ARG LIBOLM_VERSION=3.2.10
|
||||||
RUN apk add --no-cache \
|
RUN apk add --no-cache \
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
import os.path
|
import os.path
|
||||||
|
from pathlib import Path
|
||||||
from typing import Any, Callable, Dict, List, Tuple, Union
|
from typing import Any, Callable, Dict, List, Tuple, Union
|
||||||
|
|
||||||
from jinja2 import BaseLoader
|
from jinja2 import BaseLoader
|
||||||
|
|
@ -24,12 +25,12 @@ from ops_bot import get_project_root
|
||||||
from ops_bot.util import markdown
|
from ops_bot.util import markdown
|
||||||
|
|
||||||
|
|
||||||
def sync_read_file(path: str) -> str:
|
def sync_read_file(path: Union[Path, str]) -> str:
|
||||||
with open(path) as file:
|
with open(path) as file:
|
||||||
return file.read()
|
return file.read()
|
||||||
|
|
||||||
|
|
||||||
def sync_list_files(directory: str) -> list[str]:
|
def sync_list_files(directory: Union[Path, str]) -> list[str]:
|
||||||
return os.listdir(directory)
|
return os.listdir(directory)
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -108,7 +109,7 @@ class TemplateProxy:
|
||||||
|
|
||||||
|
|
||||||
class PluginTemplateLoader(BaseLoader):
|
class PluginTemplateLoader(BaseLoader):
|
||||||
directory: str
|
directory: Path
|
||||||
macros: str
|
macros: str
|
||||||
|
|
||||||
def __init__(self, base: str, directory: str) -> None:
|
def __init__(self, base: str, directory: str) -> None:
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ description = ""
|
||||||
authors = ["Abel Luck <abel@guardianproject.info>"]
|
authors = ["Abel Luck <abel@guardianproject.info>"]
|
||||||
|
|
||||||
[tool.poetry.dependencies]
|
[tool.poetry.dependencies]
|
||||||
python = "^3.9"
|
python = "^3.10"
|
||||||
matrix-nio = {extras = ["e2e"], version = "^0.19.0"}
|
matrix-nio = {extras = ["e2e"], version = "^0.19.0"}
|
||||||
fastapi = "^0.79.0"
|
fastapi = "^0.79.0"
|
||||||
uvicorn = "^0.18.2"
|
uvicorn = "^0.18.2"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue