Autogenerated type safety parameterisation of all methods

This commit is contained in:
Ian Renton
2026-09-20 20:02:19 +01:00
parent 6037e742cc
commit 324dd1414b
132 changed files with 1228 additions and 706 deletions
+4 -2
View File
@@ -1,3 +1,5 @@
from __future__ import annotations
import logging
import re
@@ -12,7 +14,7 @@ from data.activity_ref import ActivityRef
logger = logging.getLogger(__name__)
def get_activity_ref_info(activity_name, ref_id):
def get_activity_ref_info(activity_name: str, ref_id: str) -> ActivityRef | None:
"""Look up details of an activity reference (e.g. POTA park) such as name, lat/lon, and grid. Takes in an
activity name and a reference ID (both strings) and returns an ActivityRef object populated with as much data
as we can find. This makes use of activity ref data in the data store, live lookups from the web, or just
@@ -139,7 +141,7 @@ def get_activity_ref_info(activity_name, ref_id):
return activity_ref
def populate_missing_activity_ref_info(activity_ref):
def populate_missing_activity_ref_info(activity_ref: ActivityRef) -> ActivityRef:
"""Look up details of an activity reference (e.g. POTA park) such as name, lat/lon, and grid. Takes in an
activity_ref object which must at minimum have a "sig" and an "id". The rest of the object will be populated
and returned. Any data currently in the object will be kept, only missing data in the object will be populated