Add @disjoint_base decorator to the third-party stubs (#14716)

This commit is contained in:
Brian Schubert
2025-09-15 02:16:16 +02:00
committed by GitHub
parent 0d100b9110
commit 47dbbd6c91
27 changed files with 110 additions and 24 deletions
+3 -1
View File
@@ -1,7 +1,7 @@
from _typeshed import MaybeNone
from collections.abc import Callable, Iterable
from typing import Any, Final, Generic, TypeVar, type_check_only
from typing_extensions import Self, TypeAlias
from typing_extensions import Self, TypeAlias, disjoint_base
__all__ = [
"LUA_VERSION",
@@ -62,6 +62,7 @@ class _LuaNoGC: ...
_bint = TypeVar("_bint", bool, int)
@disjoint_base
class FastRLock(Generic[_bint]):
# @classmethod
# def __init__(cls, /, *args: Any, **kwargs: Any) -> None: ...
@@ -74,6 +75,7 @@ class LuaError(Exception): ...
class LuaSyntaxError(LuaError): ...
class LuaMemoryError(LuaError, MemoryError): ...
@disjoint_base
class LuaRuntime:
lua_implementation: Final[str]
lua_version: Final[tuple[int, int]]
+3 -1
View File
@@ -1,7 +1,7 @@
from _typeshed import MaybeNone
from collections.abc import Callable, Iterable
from typing import Any, Final, Generic, TypeVar, type_check_only
from typing_extensions import Self, TypeAlias
from typing_extensions import Self, TypeAlias, disjoint_base
__all__ = [
"LUA_VERSION",
@@ -62,6 +62,7 @@ class _LuaNoGC: ...
_bint = TypeVar("_bint", bool, int)
@disjoint_base
class FastRLock(Generic[_bint]):
# @classmethod
# def __init__(cls, /, *args: Any, **kwargs: Any) -> None: ...
@@ -74,6 +75,7 @@ class LuaError(Exception): ...
class LuaSyntaxError(LuaError): ...
class LuaMemoryError(LuaError, MemoryError): ...
@disjoint_base
class LuaRuntime:
lua_implementation: Final[str]
lua_version: Final[tuple[int, int]]
+3 -1
View File
@@ -1,7 +1,7 @@
from _typeshed import MaybeNone
from collections.abc import Callable, Iterable
from typing import Any, Final, Generic, TypeVar, type_check_only
from typing_extensions import Self, TypeAlias
from typing_extensions import Self, TypeAlias, disjoint_base
__all__ = [
"LUA_VERSION",
@@ -62,6 +62,7 @@ class _LuaNoGC: ...
_bint = TypeVar("_bint", bool, int)
@disjoint_base
class FastRLock(Generic[_bint]):
# @classmethod
# def __init__(cls, /, *args: Any, **kwargs: Any) -> None: ...
@@ -74,6 +75,7 @@ class LuaError(Exception): ...
class LuaSyntaxError(LuaError): ...
class LuaMemoryError(LuaError, MemoryError): ...
@disjoint_base
class LuaRuntime:
lua_implementation: Final[str]
lua_version: Final[tuple[int, int]]
+3 -1
View File
@@ -1,7 +1,7 @@
from _typeshed import MaybeNone
from collections.abc import Callable, Iterable
from typing import Any, Final, Generic, TypeVar, type_check_only
from typing_extensions import Self, TypeAlias
from typing_extensions import Self, TypeAlias, disjoint_base
__all__ = [
"LUA_VERSION",
@@ -62,6 +62,7 @@ class _LuaNoGC: ...
_bint = TypeVar("_bint", bool, int)
@disjoint_base
class FastRLock(Generic[_bint]):
# @classmethod
# def __init__(cls, /, *args: Any, **kwargs: Any) -> None: ...
@@ -74,6 +75,7 @@ class LuaError(Exception): ...
class LuaSyntaxError(LuaError): ...
class LuaMemoryError(LuaError, MemoryError): ...
@disjoint_base
class LuaRuntime:
lua_implementation: Final[str]
lua_version: Final[tuple[int, int]]
+3
View File
@@ -1,6 +1,7 @@
from _typeshed import MaybeNone
from collections.abc import Callable, Iterator
from typing import Any, Final, Generic, TypeVar, type_check_only
from typing_extensions import disjoint_base
__all__ = [
"LUA_VERSION",
@@ -54,6 +55,7 @@ class _LuaObject: ...
_bint = TypeVar("_bint", bool, int)
@disjoint_base
class FastRLock(Generic[_bint]):
# @classmethod
# def __init__(cls, /, *args: Any, **kwargs: Any) -> None: ...
@@ -66,6 +68,7 @@ class LuaError(Exception): ...
class LuaSyntaxError(LuaError): ...
class LuaMemoryError(LuaError, MemoryError): ...
@disjoint_base
class LuaRuntime:
lua_implementation: Final[str]
lua_version: Final[tuple[int, int]]
+3
View File
@@ -1,6 +1,7 @@
from _typeshed import MaybeNone
from collections.abc import Callable, Iterator
from typing import Any, Final, Generic, TypeVar, type_check_only
from typing_extensions import disjoint_base
__all__ = [
"LUA_VERSION",
@@ -54,6 +55,7 @@ class _LuaObject: ...
_bint = TypeVar("_bint", bool, int)
@disjoint_base
class FastRLock(Generic[_bint]):
# @classmethod
# def __init__(cls, /, *args: Any, **kwargs: Any) -> None: ...
@@ -66,6 +68,7 @@ class LuaError(Exception): ...
class LuaSyntaxError(LuaError): ...
class LuaMemoryError(LuaError, MemoryError): ...
@disjoint_base
class LuaRuntime:
lua_implementation: Final[str]
lua_version: Final[tuple[int, int]]