Skip to content

Commit

Permalink
Type annotations stub files #209
Browse files Browse the repository at this point in the history
  • Loading branch information
bsrdjan committed Dec 30, 2020
1 parent 47143f5 commit 4097f19
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/pyrfc/_exception.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
from typing import Any, Optional

class RFCError(Exception): ...

class RFCLibError(RFCError):
code2txt: Any = ...
message: Any = ...
code: Any = ...
key: Any = ...
msg_class: Any = ...
msg_type: Any = ...
msg_number: Any = ...
msg_v1: Any = ...
msg_v2: Any = ...
msg_v3: Any = ...
msg_v4: Any = ...
def __init__(self, message: Optional[Any] = ..., code: Optional[Any] = ..., key: Optional[Any] = ..., msg_class: Optional[Any] = ..., msg_type: Optional[Any] = ..., msg_number: Optional[Any] = ..., msg_v1: Optional[Any] = ..., msg_v2: Optional[Any] = ..., msg_v3: Optional[Any] = ..., msg_v4: Optional[Any] = ...) -> None: ...

class ABAPApplicationError(RFCLibError): ...
class ABAPRuntimeError(RFCLibError): ...

class LogonError(RFCLibError):
def __init__(self, message: Optional[Any] = ..., code: int = ..., key: str = ..., msg_class: Optional[Any] = ..., msg_type: Optional[Any] = ..., msg_number: Optional[Any] = ..., msg_v1: Optional[Any] = ..., msg_v2: Optional[Any] = ..., msg_v3: Optional[Any] = ..., msg_v4: Optional[Any] = ...) -> None: ...

class CommunicationError(RFCLibError): ...
class ExternalRuntimeError(RFCLibError): ...
class ExternalApplicationError(RFCLibError): ...
class ExternalAuthorizationError(RFCLibError): ...
class RFCTypeError(RFCLibError): ...
10 changes: 10 additions & 0 deletions src/pyrfc/pyrfc.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

from typing import Any, Optional, Dict
def get_nwrfclib_version(): tuple
def set_ini_file_directory(path_name: str): None

class Connection():
version: {major: int, minor: int, patchLevel: int}
def __init__(self, config: Optional[Dict] = {}, *params: Any) -> None: ...

__VERSION__: str

0 comments on commit 4097f19

Please sign in to comment.