From d0323f6b1299c63674a043e81318d584b9607375 Mon Sep 17 00:00:00 2001 From: Ewout ter Hoeven Date: Wed, 10 Jul 2024 09:47:45 +0200 Subject: [PATCH] Run pyupgrade for Python 3.9+ Apply pyupgrade for Python 3.9+ --- rtree/index.py | 3 ++- tests/conftest.py | 2 +- tests/test_index.py | 2 +- tests/test_tpr.py | 3 ++- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/rtree/index.py b/rtree/index.py index 59b5f4fa..169a1e96 100644 --- a/rtree/index.py +++ b/rtree/index.py @@ -6,7 +6,8 @@ import pickle import pprint import warnings -from typing import Any, Iterator, Literal, Sequence, overload +from collections.abc import Iterator, Sequence +from typing import Any, Literal, overload from . import core from .exceptions import RTreeError diff --git a/tests/conftest.py b/tests/conftest.py index 99f80b14..ae9744ce 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -2,7 +2,7 @@ import os import shutil -from typing import Iterator +from collections.abc import Iterator import py import pytest diff --git a/tests/test_index.py b/tests/test_index.py index 4a14fe8f..d1651f46 100644 --- a/tests/test_index.py +++ b/tests/test_index.py @@ -5,7 +5,7 @@ import sys import tempfile import unittest -from typing import Iterator +from collections.abc import Iterator import numpy as np import pytest diff --git a/tests/test_tpr.py b/tests/test_tpr.py index 20ea8578..d5f1e2e9 100644 --- a/tests/test_tpr.py +++ b/tests/test_tpr.py @@ -3,8 +3,9 @@ import os import unittest from collections import defaultdict, namedtuple +from collections.abc import Iterator from math import ceil -from typing import Any, Iterator +from typing import Any import numpy as np from numpy.random import default_rng