Loading .pre-commit-config.yaml +9 −1 Original line number Diff line number Diff line Loading @@ -67,10 +67,18 @@ repos: stages: [commit, manual] - repo: https://github.com/pre-commit/mirrors-mypy rev: v0.981 rev: v1.0.0 hooks: - id: mypy types: [] types_or: [python, pyi] args: [ "dxf-stubs", "jsonpath-stubs", "parse-stubs", "rcon-stubs", ] pass_filenames: false additional_dependencies: - types-requests - typing-extensions pyproject.toml +3 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,9 @@ include = "parse-stubs" [[tool.poetry.packages]] include = "dxf-stubs" [[tool.poetry.packages]] include = "rcon-stubs" [tool.isort] force_single_line = true Loading rcon-stubs/__init__.pyi 0 → 100644 +12 −0 Original line number Diff line number Diff line from .exceptions import EmptyResponse from .exceptions import SessionTimeout from .exceptions import WrongPassword from .source import Client __all__ = [ "EmptyResponse", "SessionTimeout", "WrongPassword", "Client", "rcon", ] rcon-stubs/battleye/__init__.pyi 0 → 100644 +7 −0 Original line number Diff line number Diff line from .client import Client from .proto import ServerMessage __all__ = [ "Client", "ServerMessage", ] rcon-stubs/battleye/client.pyi 0 → 100644 +30 −0 Original line number Diff line number Diff line from typing import Callable from typing import Union from ..client import BaseClient from .proto import Request from .proto import Response from .proto import ServerMessage __all__ = [ "Client", ] MessageHandler = Callable[[ServerMessage], None] class Client(BaseClient): def __init__( self, host: str, port: int, *, timeout: Union[float, None] = None, passwd: Union[str, None] = None, message_handler: MessageHandler = ..., ) -> None: ... def receive(self, max_length: int = ...) -> Response: ... def communicate(self, request: Request) -> Response: ... def login(self, passwd: str) -> bool: ... def run(self, command: str, *args: str) -> str: ... Loading
.pre-commit-config.yaml +9 −1 Original line number Diff line number Diff line Loading @@ -67,10 +67,18 @@ repos: stages: [commit, manual] - repo: https://github.com/pre-commit/mirrors-mypy rev: v0.981 rev: v1.0.0 hooks: - id: mypy types: [] types_or: [python, pyi] args: [ "dxf-stubs", "jsonpath-stubs", "parse-stubs", "rcon-stubs", ] pass_filenames: false additional_dependencies: - types-requests - typing-extensions
pyproject.toml +3 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,9 @@ include = "parse-stubs" [[tool.poetry.packages]] include = "dxf-stubs" [[tool.poetry.packages]] include = "rcon-stubs" [tool.isort] force_single_line = true Loading
rcon-stubs/__init__.pyi 0 → 100644 +12 −0 Original line number Diff line number Diff line from .exceptions import EmptyResponse from .exceptions import SessionTimeout from .exceptions import WrongPassword from .source import Client __all__ = [ "EmptyResponse", "SessionTimeout", "WrongPassword", "Client", "rcon", ]
rcon-stubs/battleye/__init__.pyi 0 → 100644 +7 −0 Original line number Diff line number Diff line from .client import Client from .proto import ServerMessage __all__ = [ "Client", "ServerMessage", ]
rcon-stubs/battleye/client.pyi 0 → 100644 +30 −0 Original line number Diff line number Diff line from typing import Callable from typing import Union from ..client import BaseClient from .proto import Request from .proto import Response from .proto import ServerMessage __all__ = [ "Client", ] MessageHandler = Callable[[ServerMessage], None] class Client(BaseClient): def __init__( self, host: str, port: int, *, timeout: Union[float, None] = None, passwd: Union[str, None] = None, message_handler: MessageHandler = ..., ) -> None: ... def receive(self, max_length: int = ...) -> Response: ... def communicate(self, request: Request) -> Response: ... def login(self, passwd: str) -> bool: ... def run(self, command: str, *args: str) -> str: ...