Add mypy error codes to type: ignores, remove unused ignores (#7504)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
Alex Waygood
2022-03-19 13:10:00 +00:00
committed by GitHub
parent 4308915e06
commit 340c6c97ed
67 changed files with 159 additions and 150 deletions

View File

@@ -33,7 +33,7 @@ class _BaseFile(list[_TB]):
metadata_is_fuzzy: bool
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
def __unicode__(self) -> Text: ...
def __contains__(self, entry: _TB) -> bool: ... # type: ignore # AttributeError otherwise
def __contains__(self, entry: _TB) -> bool: ... # type: ignore[override] # AttributeError otherwise
def __eq__(self, other: object) -> bool: ...
def append(self, entry: _TB) -> None: ...
def insert(self, index: SupportsIndex, entry: _TB) -> None: ...
@@ -60,7 +60,7 @@ class MOFile(_BaseFile[MOEntry]):
version: int
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
def save_as_pofile(self, fpath: str) -> None: ...
def save(self, fpath: Text | None = ...) -> None: ... # type: ignore # binary file does not allow argument repr_method
def save(self, fpath: Text | None = ...) -> None: ... # type: ignore[override] # binary file does not allow argument repr_method
def percent_translated(self) -> int: ...
def translated_entries(self) -> list[MOEntry]: ...
def untranslated_entries(self) -> list[MOEntry]: ...