Skip to content

Commit 06d0151

Browse files
authored
Enable redundant-self mypy error code (#11056)
1 parent d232def commit 06d0151

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

stdlib/zipfile.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ if sys.version_info >= (3, 8):
233233
def make(cls, source: ZipFile) -> CompleteDirs: ...
234234
@overload
235235
@classmethod
236-
def make(cls: type[Self], source: StrPath | IO[bytes]) -> Self: ...
236+
def make(cls, source: StrPath | IO[bytes]) -> Self: ...
237237

238238
class Path:
239239
root: CompleteDirs

tests/mypy_test.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,8 @@ def run_mypy(
268268
"--allow-subclassing-any",
269269
"--enable-error-code",
270270
"ignore-without-code",
271+
"--enable-error-code",
272+
"redundant-self",
271273
"--config-file",
272274
temp.name,
273275
]

tests/typecheck_typeshed.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ def run_mypy_as_subprocess(directory: str, platform: str, version: str) -> Retur
6363
"possibly-undefined",
6464
"--enable-error-code",
6565
"redundant-expr",
66+
"--enable-error-code",
67+
"redundant-self",
6668
"--custom-typeshed-dir",
6769
".",
6870
]

0 commit comments

Comments
 (0)