Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9197ace

Browse files
authored
Bump flake8-pyi to 24.6.0 (#12132)
1 parent 804a581 commit 9197ace

9 files changed

Lines changed: 24 additions & 28 deletions

File tree

.flake8

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ extend-ignore = Y090
88
per-file-ignores =
99
# We should only need to noqa Y and F821 codes in .pyi files
1010
*.py: NQA
11-
# Ignore Y052 in this file: there are loads of false positives
12-
# due to the fact that flake8-pyi doesn't understand subclasses of `CoerciveEnum`
13-
# as being enum classes
14-
stubs/fpdf2/fpdf/enums.pyi: Y052
1511
# Generated protobuf files:
1612
# Y021: Include docstrings
1713
# Y023: Alias typing as typing_extensions

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ repos:
3636
- id: flake8
3737
additional_dependencies:
3838
- "flake8-noqa==1.4.0" # must match requirements-tests.txt
39-
- "flake8-pyi==24.4.1" # must match requirements-tests.txt
39+
- "flake8-pyi==24.6.0" # must match requirements-tests.txt
4040
types: [file]
4141
types_or: [python, pyi]
4242
- repo: meta

requirements-tests.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
black==24.3.0 # must match .pre-commit-config.yaml
55
flake8==7.0.0 # must match .pre-commit-config.yaml
66
flake8-noqa==1.4.0 # must match .pre-commit-config.yaml
7-
flake8-pyi==24.4.1 # must match .pre-commit-config.yaml
7+
flake8-pyi==24.6.0 # must match .pre-commit-config.yaml
88
mypy==1.10.0
99
pre-commit-hooks==4.5.0 # must match .pre-commit-config.yaml
1010
pyright==1.1.366

stdlib/_ast.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ if sys.version_info >= (3, 13):
1111
PyCF_OPTIMIZED_AST: Literal[33792]
1212

1313
# Used for node end positions in constructor keyword arguments
14-
_EndPositionT = typing_extensions.TypeVar("_EndPositionT", int, int | None, default=int | None) # noqa: Y023
14+
_EndPositionT = typing_extensions.TypeVar("_EndPositionT", int, int | None, default=int | None)
1515

1616
# Alias used for fields that must always be valid identifiers
1717
# A string `x` counts as a valid identifier if both the following are True

stubs/shapely/shapely/_geometry.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,9 @@ def get_precision(geometry: Geometry | None, **kwargs) -> float: ...
162162
def get_precision(geometry: OptGeoArrayLikeSeq, **kwargs) -> NDArray[np.float64]: ...
163163

164164
class SetPrecisionMode(ParamEnum):
165-
valid_output = 0 # noqa: Y052
166-
pointwise = 1 # noqa: Y052
167-
keep_collapsed = 2 # noqa: Y052
165+
valid_output = 0
166+
pointwise = 1
167+
keep_collapsed = 2
168168

169169
@overload
170170
def set_precision(geometry: OptGeoT, grid_size: float, mode: _PrecisionMode = "valid_output", **kwargs) -> OptGeoT: ...

stubs/shapely/shapely/constructive.pyi

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ __all__ = [
3939
]
4040

4141
class BufferCapStyle(ParamEnum):
42-
round = 1 # noqa: Y052
43-
flat = 2 # noqa: Y052
44-
square = 3 # noqa: Y052
42+
round = 1
43+
flat = 2
44+
square = 3
4545

4646
class BufferJoinStyle(ParamEnum):
47-
round = 1 # noqa: Y052
48-
mitre = 2 # noqa: Y052
49-
bevel = 3 # noqa: Y052
47+
round = 1
48+
mitre = 2
49+
bevel = 3
5050

5151
@overload
5252
def boundary(geometry: Point | MultiPoint, **kwargs) -> GeometryCollection: ...

stubs/shapely/shapely/geometry/base.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from array import array
22
from collections.abc import Iterator
33
from typing import Any, Generic, Literal, NoReturn, overload
4-
from typing_extensions import Self, TypeVar, deprecated # noqa: Y023
4+
from typing_extensions import Self, TypeVar, deprecated
55

66
import numpy as np
77
from numpy.typing import NDArray

stubs/shapely/shapely/io.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ __all__ = ["from_geojson", "from_ragged_array", "from_wkb", "from_wkt", "to_geoj
1818
DecodingErrorOptions: Incomplete
1919

2020
class WKBFlavorOptions(ParamEnum):
21-
extended = 1 # noqa: Y052
22-
iso = 2 # noqa: Y052
21+
extended = 1
22+
iso = 2
2323

2424
@overload
2525
def to_wkt(

stubs/shapely/shapely/strtree.pyi

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ _BinaryPredicate: TypeAlias = Literal[
1515
]
1616

1717
class BinaryPredicate(ParamEnum):
18-
intersects = 1 # noqa: Y052
19-
within = 2 # noqa: Y052
20-
contains = 3 # noqa: Y052
21-
overlaps = 4 # noqa: Y052
22-
crosses = 5 # noqa: Y052
23-
touches = 6 # noqa: Y052
24-
covers = 7 # noqa: Y052
25-
covered_by = 8 # noqa: Y052
26-
contains_properly = 9 # noqa: Y052
18+
intersects = 1
19+
within = 2
20+
contains = 3
21+
overlaps = 4
22+
crosses = 5
23+
touches = 6
24+
covers = 7
25+
covered_by = 8
26+
contains_properly = 9
2727

2828
class STRtree:
2929
def __init__(self, geoms: GeoArrayLikeSeq, node_capacity: SupportsIndex = 10) -> None: ...

0 commit comments

Comments
 (0)