Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion requirements-tests.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Type checkers that we test our stubs against. These should always
# be pinned to a specific version to make failure reproducible.
mypy==1.20.0
mypy==2.0.0
pyright==1.1.409

# Libraries used by our various scripts.
Expand Down
8 changes: 4 additions & 4 deletions stubs/fpdf2/fpdf/encryption.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ class StandardSecurityHandler:
@overload
def encrypt(self, text: str, obj_id: int) -> str: ...
def encrypt_string(self, string: str, obj_id: int) -> str: ...
def encrypt_stream(self, stream: bytes, obj_id: int) -> bytes: ...
def encrypt_stream(self, stream: bytes | bytearray, obj_id: int) -> bytes: ...
def is_aes_algorithm(self) -> bool: ...
def encrypt_bytes(self, data: bytes, obj_id: int) -> list[int]: ...
def encrypt_AES_cryptography(self, key: bytes, data: bytes) -> bytes: ...
def encrypt_bytes(self, data: bytes | bytearray, obj_id: int) -> list[int]: ...
def encrypt_AES_cryptography(self, key: bytes, data: bytes | bytearray) -> bytes: ...
@classmethod
def get_random_bytes(cls, size: int) -> bytes: ...
@classmethod
Expand All @@ -99,7 +99,7 @@ class StandardSecurityHandler:
def generate_owner_password(self) -> str: ...
def generate_user_password(self) -> str: ...
@classmethod
def compute_hash(cls, input_password: bytes, salt: bytes, user_key: bytes = ...) -> bytes: ...
def compute_hash(cls, input_password: bytes | bytearray, salt: bytes, user_key: bytes | bytearray = ...) -> bytes: ...
def generate_user_password_rev6(self) -> None: ...
def generate_owner_password_rev6(self) -> None: ...
def generate_perms_rev6(self) -> None: ...
Expand Down
2 changes: 1 addition & 1 deletion stubs/lupa/lupa/lua51.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ _bint = TypeVar("_bint", bool, int)
class FastRLock(Generic[_bint]):
# @classmethod
# def __init__(cls, /, *args: Any, **kwargs: Any) -> None: ...
def acquire(self, blocking: _bint = True) -> _bint: ...
def acquire(self, blocking: _bint = ...) -> _bint: ...
def release(self) -> None: ...
def __enter__(self) -> _bint: ...
def __exit__(self, t: object, v: object, tb: object) -> None: ...
Expand Down
2 changes: 1 addition & 1 deletion stubs/lupa/lupa/lua52.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ _bint = TypeVar("_bint", bool, int)
class FastRLock(Generic[_bint]):
# @classmethod
# def __init__(cls, /, *args: Any, **kwargs: Any) -> None: ...
def acquire(self, blocking: _bint = True) -> _bint: ...
def acquire(self, blocking: _bint = ...) -> _bint: ...
def release(self) -> None: ...
def __enter__(self) -> _bint: ...
def __exit__(self, t: object, v: object, tb: object) -> None: ...
Expand Down
2 changes: 1 addition & 1 deletion stubs/lupa/lupa/lua53.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ _bint = TypeVar("_bint", bool, int)
class FastRLock(Generic[_bint]):
# @classmethod
# def __init__(cls, /, *args: Any, **kwargs: Any) -> None: ...
def acquire(self, blocking: _bint = True) -> _bint: ...
def acquire(self, blocking: _bint = ...) -> _bint: ...
def release(self) -> None: ...
def __enter__(self) -> _bint: ...
def __exit__(self, t: object, v: object, tb: object) -> None: ...
Expand Down
2 changes: 1 addition & 1 deletion stubs/lupa/lupa/lua54.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ _bint = TypeVar("_bint", bool, int)
class FastRLock(Generic[_bint]):
# @classmethod
# def __init__(cls, /, *args: Any, **kwargs: Any) -> None: ...
def acquire(self, blocking: _bint = True) -> _bint: ...
def acquire(self, blocking: _bint = ...) -> _bint: ...
def release(self) -> None: ...
def __enter__(self) -> _bint: ...
def __exit__(self, t: object, v: object, tb: object) -> None: ...
Expand Down
2 changes: 1 addition & 1 deletion stubs/lupa/lupa/luajit20.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ _bint = TypeVar("_bint", bool, int)
class FastRLock(Generic[_bint]):
# @classmethod
# def __init__(cls, /, *args: Any, **kwargs: Any) -> None: ...
def acquire(self, blocking: _bint = True) -> _bint: ...
def acquire(self, blocking: _bint = ...) -> _bint: ...
def release(self) -> None: ...
def __enter__(self) -> _bint: ...
def __exit__(self, t: object, v: object, tb: object) -> None: ...
Expand Down
2 changes: 1 addition & 1 deletion stubs/lupa/lupa/luajit21.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ _bint = TypeVar("_bint", bool, int)
class FastRLock(Generic[_bint]):
# @classmethod
# def __init__(cls, /, *args: Any, **kwargs: Any) -> None: ...
def acquire(self, blocking: _bint = True) -> _bint: ...
def acquire(self, blocking: _bint = ...) -> _bint: ...
def release(self) -> None: ...
def __enter__(self) -> _bint: ...
def __exit__(self, t: object, v: object, tb: object) -> None: ...
Expand Down
4 changes: 2 additions & 2 deletions tests/regr_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def run_testcases(
else:
configurations = mypy_configuration_from_distribution(package.name)

with temporary_mypy_config_file(configurations) as temp:
with temporary_mypy_config_file(configurations) as temp_config:

# "--enable-error-code ignore-without-code" is purposefully omitted.
# See https://github.com/python/typeshed/pull/8083
Expand All @@ -190,7 +190,7 @@ def run_testcases(
"--strict",
"--pretty",
"--config-file",
temp.name,
temp_config.name,
# Avoid race conditions when using the cache
# https://github.com/python/mypy/issues/13916
"--no-incremental",
Expand Down
7 changes: 2 additions & 5 deletions tests/typecheck_typeshed.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,13 @@ def run_mypy_as_subprocess(directory: str, platform: str, version: str) -> Retur
"--python-version",
version,
"--strict",
"--strict-bytes",
"--local-partial-types",
"--pretty",
"--show-traceback",
"--no-error-summary",
"--enable-error-code",
"ignore-without-code",
# https://github.com/python/mypy/issues/14309
# "--enable-error-code",
# "possibly-undefined",
"--enable-error-code",
"possibly-undefined",
"--enable-error-code",
"redundant-expr",
"--enable-error-code",
Expand Down
Loading