mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-11 09:08:27 +08:00
Fix invalid noqa comments and poorly formatted type ignores (#11497)
This commit is contained in:
@@ -55,4 +55,4 @@ class Chartsheet(_WorkbookChild, Serialisable):
|
||||
sheet_state: _VisibilityType = "visible",
|
||||
) -> None: ...
|
||||
def add_chart(self, chart) -> None: ...
|
||||
def to_tree(self) -> Element: ... # type:ignore[override]
|
||||
def to_tree(self) -> Element: ... # type: ignore[override]
|
||||
|
||||
@@ -144,7 +144,7 @@ class Max(Convertible[_M, _N]):
|
||||
allow_none: Literal[False] = False,
|
||||
max: float,
|
||||
) -> None: ...
|
||||
@overload # type:ignore[override] # Different restrictions
|
||||
@overload # type: ignore[override] # Different restrictions
|
||||
def __set__(self: Max[int, Literal[True]], instance: Serialisable | Strict, value: ConvertibleToInt | None) -> None: ...
|
||||
@overload
|
||||
def __set__(self: Max[int, Literal[False]], instance: Serialisable | Strict, value: ConvertibleToInt) -> None: ...
|
||||
@@ -178,7 +178,7 @@ class Min(Convertible[_M, _N]):
|
||||
allow_none: Literal[False] = False,
|
||||
min: float,
|
||||
) -> None: ...
|
||||
@overload # type:ignore[override] # Different restrictions
|
||||
@overload # type: ignore[override] # Different restrictions
|
||||
def __set__(self: Min[int, Literal[True]], instance: Serialisable | Strict, value: ConvertibleToInt | None) -> None: ...
|
||||
@overload
|
||||
def __set__(self: Min[int, Literal[False]], instance: Serialisable | Strict, value: ConvertibleToInt) -> None: ...
|
||||
|
||||
@@ -234,7 +234,7 @@ class NestedMinMax(Nested[_M], MinMax[_M, _N]): # type: ignore[misc]
|
||||
def __get__(self: NestedMinMax[_M, Literal[True]], instance: Serialisable | Strict, cls: type | None = None) -> _M | None: ...
|
||||
@overload
|
||||
def __get__(self: NestedMinMax[_M, Literal[False]], instance: Serialisable | Strict, cls: type | None = None) -> _M: ...
|
||||
@overload # type:ignore[override] # Different restrictions
|
||||
@overload # type: ignore[override] # Different restrictions
|
||||
def __set__(
|
||||
self: NestedMinMax[int, Literal[True]],
|
||||
instance: Serialisable | Strict,
|
||||
|
||||
@@ -3,19 +3,19 @@ from typing import ClassVar
|
||||
from .geometry import Point2D, PositiveSize2D, Transform2D
|
||||
|
||||
class XDRPoint2D(Point2D):
|
||||
namespace: ClassVar[None] # type:ignore[assignment]
|
||||
namespace: ClassVar[None] # type: ignore[assignment]
|
||||
# Same as parent
|
||||
# x = Point2D.x
|
||||
# y = Point2D.y
|
||||
|
||||
class XDRPositiveSize2D(PositiveSize2D):
|
||||
namespace: ClassVar[None] # type:ignore[assignment]
|
||||
namespace: ClassVar[None] # type: ignore[assignment]
|
||||
# Same as parent
|
||||
# cx = PositiveSize2D.cx
|
||||
# cy = PositiveSize2D.cy
|
||||
|
||||
class XDRTransform2D(Transform2D):
|
||||
namespace: ClassVar[None] # type:ignore[assignment]
|
||||
namespace: ClassVar[None] # type: ignore[assignment]
|
||||
# Same as parent
|
||||
# rot = Transform2D.rot
|
||||
# flipH = Transform2D.flipH
|
||||
|
||||
@@ -73,7 +73,7 @@ class ColumnDimension(Dimension):
|
||||
width: Float[Literal[False]]
|
||||
bestFit: Bool[Literal[False]]
|
||||
auto_size: Alias
|
||||
index: String[Literal[False]] # type:ignore[assignment]
|
||||
index: String[Literal[False]] # type: ignore[assignment]
|
||||
min: Integer[Literal[True]]
|
||||
max: Integer[Literal[True]]
|
||||
collapsed: Bool[Literal[False]]
|
||||
|
||||
@@ -173,7 +173,7 @@ class DynamicFilter(Serialisable):
|
||||
class CustomFilterValueDescriptor(Convertible[float | str, _N]):
|
||||
pattern: Pattern[str]
|
||||
expected_type: type[float | str]
|
||||
@overload # type:ignore[override] # Different restrictions
|
||||
@overload # type: ignore[override] # Different restrictions
|
||||
def __set__(
|
||||
self: CustomFilterValueDescriptor[Literal[True]], instance: Serialisable | Strict, value: str | ConvertibleToFloat | None
|
||||
) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user