mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-08 22:12:56 +00:00
Improve type safety according to pyright
Pyright found many issues that mypy doesn't seem to want to catch or mypy isn't configured to catch. Signed-off-by: Tristan Partin <tristan@neon.tech>
This commit is contained in:
@@ -2,11 +2,13 @@ from __future__ import annotations
|
||||
|
||||
from contextlib import closing
|
||||
from io import BufferedReader, RawIOBase
|
||||
from typing import Optional
|
||||
from typing import Optional, final
|
||||
|
||||
from fixtures.compare_fixtures import PgCompare
|
||||
from typing_extensions import override
|
||||
|
||||
|
||||
@final
|
||||
class CopyTestData(RawIOBase):
|
||||
def __init__(self, rows: int):
|
||||
self.rows = rows
|
||||
@@ -14,6 +16,7 @@ class CopyTestData(RawIOBase):
|
||||
self.linebuf: Optional[bytes] = None
|
||||
self.ptr = 0
|
||||
|
||||
@override
|
||||
def readable(self):
|
||||
return True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user