Skip to content

Commit af73ce4

Browse files
authored
Fix compatibility with pyright 1.1.394 (#2855)
2 parents b88c484 + 6fec395 commit af73ce4

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/click/_winconsole.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,9 @@ def get_buffer(obj: Buffer, writable: bool = False) -> Array[c_char]:
108108
PyObject_GetBuffer(py_object(obj), byref(buf), flags)
109109

110110
try:
111-
buffer_type: Array[c_char] = c_char * buf.len
112-
return buffer_type.from_address(buf.buf) # type: ignore[attr-defined, no-any-return]
111+
buffer_type = c_char * buf.len
112+
out: Array[c_char] = buffer_type.from_address(buf.buf)
113+
return out
113114
finally:
114115
PyBuffer_Release(byref(buf))
115116

0 commit comments

Comments
 (0)