Skip to content

Commit

Permalink
Add mypy stubs for xmltodict & requests-pkcs12
Browse files Browse the repository at this point in the history
  • Loading branch information
messense committed Jan 15, 2021
1 parent 78a46a1 commit 0755e86
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
2 changes: 2 additions & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ warn_unused_ignores = True
# Needed because of bug in MyPy
disallow_subclassing_any = False

mypy_path = stubs

[mypy-*]
disallow_untyped_calls = True
disallow_untyped_defs = True
Expand Down
7 changes: 3 additions & 4 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions stubs/requests_pkcs12.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from requests.adapters import HTTPAdapter
from typing import Any

class Pkcs12Adapter(HTTPAdapter):
ssl_context: Any = ...
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
def init_poolmanager(self, *args: Any, **kwargs: Any): ...
def proxy_manager_for(self, *args: Any, **kwargs: Any): ...
7 changes: 7 additions & 0 deletions stubs/xmltodict.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from typing import Any, Optional


class ParsingInterrupted(Exception): ...

def parse(xml_input: Any, encoding: Optional[Any] = ..., expat: Any = ..., process_namespaces: bool = ..., namespace_separator: str = ..., disable_entities: bool = ..., process_comments: bool = ..., **kwargs: Any): ...
def unparse(input_dict: Any, output: Optional[Any] = ..., encoding: str = ..., full_document: bool = ..., short_empty_elements: bool = ..., **kwargs: Any): ...

0 comments on commit 0755e86

Please sign in to comment.