8000 Enable pyright for all Python 3 stubs by srittau · Pull Request #5597 · python/typeshed · GitHub
[go: up one dir, main page]

Skip to content

Enable pyright for all Python 3 stubs #5597

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jun 9, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
blacken
  • Loading branch information
srittau committed Jun 9, 2021
commit 5b89893b0640ec56abce5d1ffd8683719df1ed2c
12 changes: 0 additions & 12 deletions stubs/paramiko/paramiko/_winapi.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,14 @@ from typing import Any, Optional, Type, TypeVar
if sys.platform == "win32":

_T = TypeVar("_T")

def format_system_message(errno: int) -> Optional[str]: ...

class WindowsError(builtins.WindowsError):
def __init__(self, value: Optional[int] = ...) -> None: ...
@property
def message(self) -> str: ...
@property
def code(self) -> int: ...

def handle_nonzero_success(result: int) -> None: ...

GMEM_MOVEABLE: int
GlobalAlloc: Any
GlobalLock: Any
Expand All @@ -28,7 +24,6 @@ if sys.platform == "win32":
MapViewOfFile: Any
UnmapViewOfFile: Any
RtlMoveMemory: Any

class MemoryMap:
name: str
length: int
Expand All @@ -44,7 +39,6 @@ if sys.platform == "win32":
def __exit__(
self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], tb: Optional[TracebackType]
) -> None: ...

READ_CONTROL: int
STANDARD_RIGHTS_REQUIRED: int
STANDARD_RIGHTS_READ: int
Expand All @@ -68,20 +62,15 @@ if sys.platform == "win32":
POLICY_READ: int
POLICY_WRITE: int
POLICY_EXECUTE: int

class TokenAccess:
TOKEN_QUERY: int

class TokenInformationClass:
TokenUser: int

class TOKEN_USER(ctypes.Structure):
num: int

class SECURITY_DESCRIPTOR(ctypes.Structure):
SECURITY_DESCRIPTOR_CONTROL: Any
REVISION: int

class SECURITY_ATTRIBUTES(ctypes.Structure):
nLength: int
lpSecurityDescriptor: Any
Expand All @@ -90,7 +79,6 @@ if sys.platform == "win32":
def descriptor(self) -> Any: ...
@descriptor.setter
def descriptor(self, value: Any) -> None: ...

def GetTokenInformation(token: Any, information_class: Any) -> Any: ...
def OpenProcessToken(proc_handle: Any, access: Any) -> Any: ...
def get_current_user() -> TOKEN_USER: ...
Expand Down
4 changes: 3 additions & 1 deletion stubs/redis/redis/client.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -1116,7 +1116,9 @@ class Pipeline(Redis[_StrType], Generic[_StrType]):
def hkeys(self, name: _Key) -> Pipeline[_StrType]: ... # type: ignore [override]
def hlen(self, name: _Key) -> Pipeline[_StrType]: ... # type: ignore [override]
@overload # type: ignore [override]
def hset(self, name: _Key, key: _Key, value: _Value, mapping: Optional[Mapping[_Key, _Value]] = ...) -> Pipeline[_StrType]: ...
def hset(
self, name: _Key, key: _Key, value: _Value, mapping: Optional[Mapping[_Key, _Value]] = ...
) -> Pipeline[_StrType]: ...
@overload # type: ignore [override]
def hset(self, name: _Key, key: None, value: None, mapping: Mapping[_Key, _Value]) -> Pipeline[_StrType]: ...
@overload # type: ignore [override]
Expand Down
0