NotRequired fix
This commit is contained in:
parent
12bd468c7c
commit
fbce5b4d7d
3 changed files with 9 additions and 1 deletions
|
@ -45,6 +45,7 @@ jobs:
|
||||||
- name: Install packages
|
- name: Install packages
|
||||||
run: |
|
run: |
|
||||||
python --version
|
python --version
|
||||||
|
python -m venv .venv && source .venv/bin/activate
|
||||||
pip install -e .[testing] --disable-pip-version-check --no-cache-dir -q
|
pip install -e .[testing] --disable-pip-version-check --no-cache-dir -q
|
||||||
python -m pip list --format=columns --disable-pip-version-check
|
python -m pip list --format=columns --disable-pip-version-check
|
||||||
- name: Run pytest
|
- name: Run pytest
|
||||||
|
|
|
@ -18,6 +18,7 @@ dependencies = [
|
||||||
"pillow~=10.4.0",
|
"pillow~=10.4.0",
|
||||||
"requests~=2.32.3",
|
"requests~=2.32.3",
|
||||||
"tqdm~=4.66.5",
|
"tqdm~=4.66.5",
|
||||||
|
"typing_extensions>=4.0; python_version < '3.11'",
|
||||||
]
|
]
|
||||||
|
|
||||||
[project.optional-dependencies]
|
[project.optional-dependencies]
|
||||||
|
|
|
@ -1,8 +1,14 @@
|
||||||
import logging
|
import logging
|
||||||
import pathlib
|
import pathlib
|
||||||
from typing import Annotated, List, NotRequired, Tuple, TypedDict
|
from typing import Annotated, List, Tuple, TypedDict
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
|
# Backport of NotRequired for python 3.10 and older
|
||||||
|
try:
|
||||||
|
from typing import NotRequired
|
||||||
|
except ImportError:
|
||||||
|
from typing_extensions import NotRequired
|
||||||
|
|
||||||
from ..config import AtlasAPIConfig, PathConfig, ExpressionDefaults, LoggingConfig
|
from ..config import AtlasAPIConfig, PathConfig, ExpressionDefaults, LoggingConfig
|
||||||
|
|
||||||
LOGGER = logging.getLogger(LoggingConfig.NAME)
|
LOGGER = logging.getLogger(LoggingConfig.NAME)
|
||||||
|
|
Loading…
Add table
Reference in a new issue