Using precise code for pyright: ignore and re-enabling various pyright tests (#12576)

This commit is contained in:
Avasam
2024-08-21 21:34:52 -04:00
committed by GitHub
parent 2404a70f2b
commit 3719f02dbf
18 changed files with 60 additions and 75 deletions

View File

@@ -351,7 +351,7 @@ class Blob(Object):
# This is not a real subclassing. Just ensuring type-checkers sees this type as compatible with _CDataBase
# pyright has no error code for subclassing final
@final
class Branch(Reference): # type: ignore[misc] # pyright: ignore
class Branch(Reference): # type: ignore[misc] # pyright: ignore[reportGeneralTypeIssues]
branch_name: str
raw_branch_name: bytes
remote_name: str

View File

@@ -18,7 +18,7 @@ def strarray_to_strings(arr: _GitStrArray) -> list[str]: ...
# Actual type: _cffi_backend.__CDataOwn <cdata 'struct git_strarray *'>
# This is not a real subclassing. Just ensuring type-checkers sees this type as compatible with _CDataBase
# pyright has no error code for subclassing final
class _GitStrArray(_CDataBase): # type: ignore[misc] # pyright: ignore
class _GitStrArray(_CDataBase): # type: ignore[misc] # pyright: ignore[reportGeneralTypeIssues]
count: int
strings: _CDataBase # <cdata 'char * *'>