From bc344ec0fabb2a1476ce97c893bc2b78e3ad50e5 Mon Sep 17 00:00:00 2001 From: Paddy Roddy Date: Mon, 4 Sep 2023 10:21:18 +0100 Subject: [PATCH] DEV: Drop python 3 8 support --- .github/workflows/test.yml | 2 +- heracles/maps.py | 14 +++++++------- pyproject.toml | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0dc2e98..1fca1a7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,7 +37,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.9", "3.10", "3.11"] steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 diff --git a/heracles/maps.py b/heracles/maps.py index 2e4e19d..d9e64a8 100644 --- a/heracles/maps.py +++ b/heracles/maps.py @@ -122,13 +122,13 @@ class Map(metaclass=ABCMeta): """ - def __init__(self, columns: t.Tuple[t.Optional[str]]) -> None: + def __init__(self, columns: tuple[t.Optional[str]]) -> None: """Initialise the map.""" self._columns = columns super().__init__() @property - def columns(self) -> t.Tuple[t.Optional[str]]: + def columns(self) -> tuple[t.Optional[str]]: """Return the catalogue columns used by this map.""" return self._columns @@ -622,10 +622,10 @@ def map_catalogs( *, parallel: bool = False, out: t.MutableMapping[t.Any, t.Any] = None, - include: t.Optional[t.Sequence[t.Tuple[t.Any, t.Any]]] = None, - exclude: t.Optional[t.Sequence[t.Tuple[t.Any, t.Any]]] = None, + include: t.Optional[t.Sequence[tuple[t.Any, t.Any]]] = None, + exclude: t.Optional[t.Sequence[tuple[t.Any, t.Any]]] = None, progress: bool = False, -) -> t.Dict[t.Tuple[t.Any, t.Any], MapData]: +) -> dict[tuple[t.Any, t.Any], MapData]: """Make maps for a set of catalogues.""" # the toc dict of maps @@ -729,12 +729,12 @@ def map_catalogs( def transform_maps( - maps: t.Mapping[t.Tuple[t.Any, t.Any], MapData], + maps: t.Mapping[tuple[t.Any, t.Any], MapData], *, out: t.MutableMapping[t.Any, t.Any] = None, progress: bool = False, **kwargs, -) -> t.Dict[t.Tuple[t.Any, t.Any], np.ndarray]: +) -> dict[tuple[t.Any, t.Any], np.ndarray]: """transform a set of maps to alms""" # the output toc dict diff --git a/pyproject.toml b/pyproject.toml index bd63a4c..93f0b5a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,7 +39,7 @@ optional-dependencies = {docs = [ "pytest", ]} readme = "README.md" -requires-python = ">=3.8" +requires-python = ">=3.9" urls.Documentation = "https://heracles.readthedocs.io/" urls.Homepage = "https://github.com/heracles-ec/heracles" urls.Issues = "https://github.com/heracles-ec/heracles/issues" @@ -92,7 +92,7 @@ select = [ "W", "YTT", ] -target-version = "py38" +target-version = "py39" isort.known-first-party = [ "heracles", ]