Skip to content

Commit

Permalink
🐝 Bump python version (#3593)
Browse files Browse the repository at this point in the history
* 🐝 Bump python version
  • Loading branch information
Marigold authored Nov 26, 2024
1 parent 4b0b15f commit c5adbd0
Show file tree
Hide file tree
Showing 5 changed files with 453 additions and 45 deletions.
5 changes: 3 additions & 2 deletions default.mk
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ install-uv-default:
@echo '==> Installing packages'
@if [ -n "$(PYTHON_VERSION)" ]; then \
echo '==> Using Python version $(PYTHON_VERSION)'; \
export UV_PYTHON=$(PYTHON_VERSION); \
[ -f $$HOME/.cargo/env ] && . $$HOME/.cargo/env || true && UV_PYTHON=$(PYTHON_VERSION) uv sync --all-extras; \
else \
[ -f $$HOME/.cargo/env ] && . $$HOME/.cargo/env || true && uv sync --all-extras; \
fi
[ -f $$HOME/.cargo/env ] && . $$HOME/.cargo/env || true && uv sync --all-extras

check-default:
@echo '==> Lint & Format & Typecheck changed files'
Expand Down
4 changes: 2 additions & 2 deletions lib/catalog/owid/catalog/processing_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from dataclasses import dataclass, field
from functools import wraps
from pathlib import Path
from typing import Any, Dict, List, Literal, Optional, Tuple
from typing import Any, Dict, List, Literal, Optional, Tuple, Union

from dataclasses_json import dataclass_json

Expand Down Expand Up @@ -68,7 +68,7 @@ class ProcessingLog(List[LogEntry]):
# hack for dataclasses_json
__args__ = (LogEntry,)

def __init__(self, entries: List[LogEntry | Dict[str, Any]] = []):
def __init__(self, entries: List[Union[LogEntry, Dict[str, Any]]] = []):
# Accept both LogEntry and dict when initializing, i.e. ProcessingLog([{"variable": "foo", ...}]) returns a list
# of LogEntry objects.
super().__init__([entry if isinstance(entry, LogEntry) else LogEntry.from_dict(entry) for entry in entries])
Expand Down
Loading

0 comments on commit c5adbd0

Please sign in to comment.