Skip to content

Commit a78958f

Browse files
PatBall1cursoragent
andcommitted
Add from __future__ import annotations for Python 3.8 compatibility
The str | Path union type syntax requires Python 3.10+ but setup.py declares python_requires>=3.8. This fixes the HuggingFace Spaces demo which runs Python 3.8. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 4dc2be1 commit a78958f

4 files changed

Lines changed: 4 additions & 0 deletions

File tree

detectree2/models/evaluation.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
33
Classes and functions to evaluate model performances.
44
"""
5+
from __future__ import annotations
56
import json
67
import os
78
from pathlib import Path

detectree2/models/outputs.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
Funtions to process model predictions into outputs for model evaluation and
44
mapping crowns in geographic space.
55
"""
6+
from __future__ import annotations
67
import glob
78
import json
89
import re

detectree2/models/predict.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
33
This module contains the code to generate predictions on tiled data.
44
"""
5+
from __future__ import annotations
56
import json
67
from pathlib import Path
78

detectree2/models/train.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
Classes and functions to train a model based on othomosaics and corresponding
44
manual crown data.
55
"""
6+
from __future__ import annotations
67
import datetime
78
import json
89
import logging

0 commit comments

Comments
 (0)