Skip to content

Commit da1c8fc

Browse files
Aniketsywmvanvliet
andauthored
MAINT: cleanup Python 3.9 compat from __future__ import annotations (#13749)
Co-authored-by: Marijn van Vliet <w.m.vanvliet@gmail.com>
1 parent 69b61ce commit da1c8fc

11 files changed

Lines changed: 3 additions & 26 deletions

File tree

doc/changes/dev/13749.other.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Remove ``from __future__ import annotations`` as it is only needed for Python ≤ 3.9 by `Aniket Singh Yadav`_.

mne/channels/channels.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
# Copyright the MNE-Python contributors.
44

55

6-
from __future__ import annotations # only needed for Python ≤ 3.9
7-
86
import os.path as op
97
import string
108
import sys

mne/datasets/_fetch.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
# License: BSD-3-Clause
33
# Copyright the MNE-Python contributors.
44

5-
from __future__ import annotations # only needed for Python ≤ 3.9
6-
75
import os
86
import os.path as op
97
import sys

mne/evoked.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
# License: BSD-3-Clause
33
# Copyright the MNE-Python contributors.
44

5-
from __future__ import annotations # only needed for Python ≤ 3.9
6-
75
from copy import deepcopy
86
from inspect import getfullargspec
97
from pathlib import Path

mne/html_templates/_templates.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
# License: BSD-3-Clause
33
# Copyright the MNE-Python contributors.
44

5-
from __future__ import annotations # only needed for Python ≤ 3.9
6-
75
import datetime
86
import functools
97
import uuid

mne/io/ant/ant.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@
22
# License: BSD-3-Clause
33
# Copyright the MNE-Python contributors.
44

5-
from __future__ import annotations
6-
75
import re
86
from collections import defaultdict
9-
from typing import TYPE_CHECKING
7+
from pathlib import Path
108

119
import numpy as np
10+
from numpy.typing import NDArray
1211

1312
from ..._fiff.constants import FIFF
1413
from ..._fiff.meas_info import create_info
@@ -25,11 +24,6 @@
2524
)
2625
from ..base import BaseRaw
2726

28-
if TYPE_CHECKING:
29-
from pathlib import Path
30-
31-
from numpy.typing import NDArray
32-
3327
_UNITS: dict[str, float] = {"uv": 1e-6, "µv": 1e-6}
3428

3529

mne/io/ant/tests/test_ant.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
# License: BSD-3-Clause
33
# Copyright the MNE-Python contributors.
44

5-
from __future__ import annotations
6-
75
import warnings
86
from pathlib import Path
97

mne/preprocessing/ica.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
# License: BSD-3-Clause
44
# Copyright the MNE-Python contributors.
55

6-
from __future__ import annotations # only needed for Python ≤ 3.9
7-
86
import json
97
import math
108
import warnings

mne/report/report.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
# License: BSD-3-Clause
55
# Copyright the MNE-Python contributors.
66

7-
from __future__ import annotations # only needed for Python ≤ 3.9
8-
97
import base64
108
import copy
119
import dataclasses

mne/viz/_3d.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
# License: BSD-3-Clause
55
# Copyright the MNE-Python contributors.
66

7-
from __future__ import annotations # only needed for Python ≤ 3.9
8-
97
import os
108
import os.path as op
119
import warnings

0 commit comments

Comments
 (0)