Skip to content

Commit 1f4354b

Browse files
committed
Fix Python version migration.
1 parent 27162fd commit 1f4354b

11 files changed

Lines changed: 17 additions & 17 deletions

File tree

‎.devcontainer/Dockerfile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.9-slim
1+
FROM python:3.10-slim
22

33
# Avoid warnings by switching to noninteractive
44
ENV DEBIAN_FRONTEND=noninteractive

‎.githooks/pre-commit‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ if ! ruff format --check; then
1212
fi
1313

1414
echo "Lint with Ruff..."
15-
ruff check || { echo "FAIL"; exit 1; }
15+
ruff check --exclude map_machine/doc/moire_manager.py || { echo "FAIL"; exit 1; }
1616

1717
echo "Check with ty..."
1818
ty check || { echo "FAIL"; exit 1; }

‎.github/workflows/test.yml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v4
14-
- name: Set up Python 3.9
14+
- name: Set up Python 3.10
1515
uses: actions/setup-python@v5
1616
with:
17-
python-version: 3.9
17+
python-version: "3.10"
1818
cache: pip
1919
- name: Install dependencies
2020
run: |
@@ -36,10 +36,10 @@ jobs:
3636
runs-on: windows-latest
3737
steps:
3838
- uses: actions/checkout@v4
39-
- name: Set up Python 3.9
39+
- name: Set up Python 3.10
4040
uses: actions/setup-python@v5
4141
with:
42-
python-version: 3.9
42+
python-version: "3.10"
4343
cache: pip
4444
- name: Install dependencies
4545
run: |

‎Dockerfile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.9-slim-bullseye
1+
FROM python:3.10-slim-bullseye
22

33
WORKDIR /app
44

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ Every way and node displayed with the random color picked for each author with `
168168

169169
## Installation
170170

171-
Requirements: Python 3.9.
171+
Requirements: Python 3.10.
172172

173173
* Install the [cairo 2D graphic library](https://www.cairographics.org/download/),
174174
* install the [GEOS library](https://libgeos.org),

‎doc/moi/contributing.moi‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This will allow you to automatically check your commit message and code before c
1212

1313
\3 {First configure your workspace} {}
1414

15-
Make sure you have Python 3.9 development tools. E.g., for Ubuntu, run \m {apt install python3.9-dev python3.9-venv}.
15+
Make sure you have Python 3.10 development tools. E.g., for Ubuntu, run \m {apt install python3.10-dev python3.10-venv}.
1616

1717
Activate virtual environment. E.g. for fish shell, run \m {source venv/bin/activate.fish}.
1818

‎doc/moi/install.moi‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
\2 {Install} {install}
22

3-
Map Machine requires \ref {https://www.python.org} {Python} 3.9, \ref {https://pip.pypa.io/en/stable/installation/} {pip}, and two libraries\:
3+
Map Machine requires \ref {https://www.python.org} {Python} 3.10, \ref {https://pip.pypa.io/en/stable/installation/} {pip}, and two libraries\:
44

55
\list
66
{\ref {https://www.cairographics.org/download/} {cairo 2D graphic library},}

‎doc/moi/readme.moi‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ Every way and node displayed with the random color picked for each author with \
217217

218218
\2 {Installation} {installation}
219219

220-
Requirements\: Python 3.9/* or higher*/.
220+
Requirements\: Python 3.10/* or higher*/.
221221

222222
\list
223223
{Install the \ref {https://www.cairographics.org/download/} {cairo 2D graphic library},}

‎map_machine/doc/icons.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from __future__ import annotations
44

55
from pathlib import Path
6-
from typing import TYPE_CHECKING, Callable
6+
from typing import TYPE_CHECKING
77

88
from colour import Color
99

@@ -17,7 +17,7 @@
1717
from map_machine.workspace import workspace
1818

1919
if TYPE_CHECKING:
20-
from collections.abc import Iterable
20+
from collections.abc import Callable, Iterable
2121

2222
SKIP: bool = True
2323
BLACK: Color = Color("black")

‎map_machine/doc/moire_manager.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import argparse
44
from abc import ABC
55
from pathlib import Path
6-
from typing import Any, ClassVar, Union
6+
from typing import Any, ClassVar
77

88
from moire.default import Default, DefaultHTML, DefaultMarkdown, DefaultWiki
99
from moire.moire import Tag
@@ -17,7 +17,7 @@
1717
__email__ = "me@enzet.ru"
1818

1919
Arguments = list[Any]
20-
Code = Union[str, Tag, list]
20+
Code = str | Tag | list
2121

2222
PREFIX: str = "https://wiki.openstreetmap.org/wiki/"
2323

0 commit comments

Comments
 (0)