Skip to content

Commit 11fcb24

Browse files
committed
refactor(types): enable postponed evaluation of annotations
Import `__future__.annotations` to allow forward references and string-based type hints, reducing circular import issues and improving PEP 563 compatibility across the pyinterp package.
1 parent 3e5f4b1 commit 11fcb24

71 files changed

Lines changed: 142 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

pyinterp/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
geospatial operations, and statistical analysis tools.
99
"""
1010

11+
from __future__ import annotations
12+
1113
import copyreg
1214
import sys
1315
from typing import Any

pyinterp/tests/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
# BSD-style license that can be found in the LICENSE file.
55
"""Test datasets for pyinterp package."""
66

7+
from __future__ import annotations
8+
79
import json
810
import pathlib
911

pyinterp/tests/core/fill/test_matrix.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
# BSD-style license that can be found in the LICENSE file.
55
"""Unit tests for matrix fill function."""
66

7+
from __future__ import annotations
8+
79
import numpy as np
810
import pytest
911

pyinterp/tests/core/geometry/cartesian/algorithm/conftest.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
# BSD-style license that can be found in the LICENSE file.
55
"""Pytest fixtures for Cartesian geometry algorithm tests."""
66

7+
from __future__ import annotations
8+
79
import numpy as np
810
import pytest
911

pyinterp/tests/core/geometry/cartesian/algorithm/for_each_points/test_covered_by.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
# BSD-style license that can be found in the LICENSE file.
55
"""Tests for for_each_point_X algorithms (Cartesian)."""
66

7+
from __future__ import annotations
8+
79
import numpy as np
810

911
from .......core.geometry.cartesian import (

pyinterp/tests/core/geometry/cartesian/algorithm/for_each_points/test_distance.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
# BSD-style license that can be found in the LICENSE file.
55
"""Tests for for_each_point_X algorithms (Cartesian)."""
66

7+
from __future__ import annotations
8+
79
import numpy as np
810
import pytest
911

pyinterp/tests/core/geometry/cartesian/algorithm/for_each_points/test_within.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
# BSD-style license that can be found in the LICENSE file.
55
"""Tests for for_each_point_X algorithms (Cartesian)."""
66

7+
from __future__ import annotations
8+
79
import numpy as np
810

911
from .......core.geometry.cartesian import (

pyinterp/tests/core/geometry/cartesian/algorithm/measurements/test_area.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
# BSD-style license that can be found in the LICENSE file.
55
"""Tests for area algorithm."""
66

7+
from __future__ import annotations
8+
79
import math
810

911
from .......core.geometry.cartesian import (

pyinterp/tests/core/geometry/cartesian/algorithm/measurements/test_azimuth.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
# BSD-style license that can be found in the LICENSE file.
55
"""Tests for azimuth algorithm."""
66

7+
from __future__ import annotations
8+
79
import math
810

911
from .......core.geometry.cartesian import Segment

pyinterp/tests/core/geometry/cartesian/algorithm/measurements/test_buffer.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
# BSD-style license that can be found in the LICENSE file.
55
"""Tests for buffer algorithm and strategy classes."""
66

7+
from __future__ import annotations
8+
79
import numpy as np
810

911
from .......core.geometry.cartesian import LineString, Point, Polygon, Ring

0 commit comments

Comments
 (0)