Skip to content

Commit 7e0fa69

Browse files
authored
fix style issues
1 parent 9b2a355 commit 7e0fa69

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

stubs/cffi/_cffi_backend.pyi

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import sys
22
import types
3-
from _typeshed import Incomplete, ReadableBuffer, WriteableBuffer
3+
from _typeshed import ReadableBuffer, WriteableBuffer
44
from collections.abc import Callable, Hashable
5-
from typing import Any, ClassVar, Literal, Optional, Protocol, Self, SupportsIndex, TypeVar, final, overload, type_check_only
5+
from typing import Any, ClassVar, Literal, Protocol, SupportsIndex, TypeVar, final, overload, type_check_only
66
from typing_extensions import Self, TypeAlias, disjoint_base
77

88
_T = TypeVar("_T")
@@ -27,11 +27,11 @@ if sys.platform != "win32":
2727

2828
@final
2929
class CField:
30-
bitshift: int
31-
bitsize: int
32-
flags: int
33-
offset: int
34-
type: 'CType'
30+
bitshift: int
31+
bitsize: int
32+
flags: int
33+
offset: int
34+
type: 'CType'
3535

3636
@final
3737
class CLibrary:
@@ -45,18 +45,18 @@ class CType:
4545
cname: str
4646
kind: Literal['enum', 'primitive', 'pointer', 'array', 'void', 'struct', 'union', 'function']
4747

48-
abi: int
49-
args: tuple['CType', ...]
50-
ellipsis: bool
51-
result: 'CType'
48+
abi: int
49+
args: tuple['CType', ...]
50+
ellipsis: bool
51+
result: 'CType'
5252

5353
item: 'CType'
54-
length: Optional[int]
54+
length: int | None
5555

56-
fields: Optional[list[tuple[str, CField]]]
56+
fields: list[tuple[str, CField]] | None
5757

58-
relements: dict[str, int]
59-
elements: dict[int, str]
58+
relements: dict[str, int]
59+
elements: dict[int, str]
6060

6161
@final
6262
class Lib:
@@ -99,18 +99,18 @@ class _CDataBase:
9999

100100
@final
101101
class buffer:
102-
__hash__: ClassVar[None] # type: ignore[assignment]
103-
def __new__(cls, cdata: _CDataBase, size: int = -1) -> Self: ...
104-
def __buffer__(self, flags: int, /) -> memoryview: ...
105-
def __eq__(self, other: ReadableBuffer, /) -> bool: ...
106-
def __ne__(self, other: ReadableBuffer, /) -> bool: ...
107-
def __ge__(self, other: ReadableBuffer, /) -> bool: ...
108-
def __gt__(self, other: ReadableBuffer, /) -> bool: ...
109-
def __le__(self, other: ReadableBuffer, /) -> bool: ...
110-
def __lt__(self, other: ReadableBuffer, /) -> bool: ...
111-
def __len__(self) -> int: ...
112-
def __getitem__(self, index: SupportsIndex | slice, /) -> bytes: ...
113-
def __setitem__(self, index: SupportsIndex | slice, value: bytes, /) -> None: ...
102+
__hash__: ClassVar[None] # type: ignore[assignment]
103+
def __new__(cls, cdata: _CDataBase, size: int = -1) -> Self: ...
104+
def __buffer__(self, flags: int, /) -> memoryview: ...
105+
def __eq__(self, other: ReadableBuffer, /) -> bool: ...
106+
def __ne__(self, other: ReadableBuffer, /) -> bool: ...
107+
def __ge__(self, other: ReadableBuffer, /) -> bool: ...
108+
def __gt__(self, other: ReadableBuffer, /) -> bool: ...
109+
def __le__(self, other: ReadableBuffer, /) -> bool: ...
110+
def __lt__(self, other: ReadableBuffer, /) -> bool: ...
111+
def __len__(self) -> int: ...
112+
def __getitem__(self, index: SupportsIndex | slice, /) -> bytes: ...
113+
def __setitem__(self, index: SupportsIndex | slice, value: bytes, /) -> None: ...
114114

115115
# These aliases are to work around pyright complaints.
116116
# Pyright doesn't like it when a class object is defined as an alias

0 commit comments

Comments
 (0)