Skip to content

Commit 2c19076

Browse files
authored
STY: ruff/isort config tweaks (#29183)
* DEV: import-related ruff config tweaks * STY: run ``ruff check --fix`` to fix the new ``I001`` errors
1 parent 3d1cdb4 commit 2c19076

Some content is hidden

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

66 files changed

+80
-104
lines changed

numpy/_core/_dtype.pyi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from typing import Final, TypeAlias, TypedDict, overload, type_check_only
22
from typing import Literal as L
3-
43
from typing_extensions import ReadOnly, TypeVar
54

65
import numpy as np

numpy/_core/_internal.pyi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import ctypes as ct
22
import re
33
from collections.abc import Callable, Iterable
44
from typing import Any, Final, Generic, Self, overload
5-
65
from typing_extensions import TypeVar, deprecated
76

87
import numpy as np

numpy/_core/_ufunc_config.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1+
from _typeshed import SupportsWrite
12
from collections.abc import Callable
23
from typing import Any, Literal, TypeAlias, TypedDict, type_check_only
34

4-
from _typeshed import SupportsWrite
5-
65
from numpy import errstate as errstate
76

87
_ErrKind: TypeAlias = Literal["ignore", "warn", "raise", "call", "print", "log"]

numpy/_core/arrayprint.pyi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ from typing import (
1313
overload,
1414
type_check_only,
1515
)
16-
1716
from typing_extensions import deprecated
1817

1918
import numpy as np

numpy/_core/defchararray.pyi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from typing import Any, Self, SupportsIndex, SupportsInt, TypeAlias, overload
22
from typing import Literal as L
3-
43
from typing_extensions import TypeVar
54

65
import numpy as np

numpy/_core/fromnumeric.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# ruff: noqa: ANN401
2+
from _typeshed import Incomplete
23
from collections.abc import Sequence
34
from typing import (
45
Any,
@@ -11,8 +12,6 @@ from typing import (
1112
overload,
1213
type_check_only,
1314
)
14-
15-
from _typeshed import Incomplete
1615
from typing_extensions import deprecated
1716

1817
import numpy as np

numpy/_core/function_base.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1+
from _typeshed import Incomplete
12
from typing import Literal as L
23
from typing import SupportsIndex, TypeAlias, TypeVar, overload
34

4-
from _typeshed import Incomplete
5-
65
import numpy as np
76
from numpy._typing import (
87
DTypeLike,

numpy/_core/multiarray.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# TODO: Sort out any and all missing functions in this namespace
22
import datetime as dt
3+
from _typeshed import StrOrBytesPath, SupportsLenAndGetItem
34
from collections.abc import Callable, Iterable, Sequence
45
from typing import (
56
Any,
@@ -18,8 +19,6 @@ from typing import (
1819
from typing import (
1920
Literal as L,
2021
)
21-
22-
from _typeshed import StrOrBytesPath, SupportsLenAndGetItem
2322
from typing_extensions import CapsuleType
2423

2524
import numpy as np

numpy/_core/records.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# ruff: noqa: ANN401
22
# pyright: reportSelfClsParameterName=false
3+
from _typeshed import StrOrBytesPath
34
from collections.abc import Iterable, Sequence
45
from typing import (
56
Any,
@@ -11,8 +12,6 @@ from typing import (
1112
overload,
1213
type_check_only,
1314
)
14-
15-
from _typeshed import StrOrBytesPath
1615
from typing_extensions import TypeVar
1716

1817
import numpy as np

numpy/_core/tests/test_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import sys
22

33
import pytest
4-
from numpy._core._rational_tests import rational
54

65
import numpy as np
76
import numpy._core.umath as ncu
7+
from numpy._core._rational_tests import rational
88
from numpy.testing import (
99
HAS_REFCOUNT,
1010
assert_,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy