-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from mdaehnert/master
Static typings added.
- Loading branch information
Showing
7 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ coverage.xml | |
/.pytest_cache/ | ||
/build/ | ||
*.egg-info/ | ||
/.mypy_cache/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
""" | ||
*.pyi files are auto-generated with the following commands: | ||
$> pip install mypy | ||
$> stubgen ./crhelper -o . | ||
""" | ||
from crhelper.resource_helper import CfnResource as CfnResource, FAILED as FAILED, SUCCESS as SUCCESS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import logging | ||
from typing import Any, Optional | ||
|
||
class JsonFormatter(logging.Formatter): | ||
format_dict: Any = ... | ||
default_json_formatter: Any = ... | ||
def __init__(self, **kwargs: Any) -> None: ... | ||
def format(self, record: Any): ... | ||
|
||
def setup(level: str = ..., formatter_cls: Any = ..., boto_level: Optional[Any] = ..., **kwargs: Any) -> None: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
from crhelper import log_helper as log_helper | ||
from typing import Any | ||
|
||
logger: Any | ||
SUCCESS: str | ||
FAILED: str | ||
|
||
class CfnResource: | ||
Status: str = ... | ||
Reason: str = ... | ||
PhysicalResourceId: str = ... | ||
StackId: str = ... | ||
RequestId: str = ... | ||
LogicalResourceId: str = ... | ||
Data: Any = ... | ||
def __init__(self, json_logging: bool = ..., log_level: str = ..., boto_level: str = ..., polling_interval: int = ..., sleep_on_delete: int = ...) -> None: ... | ||
def __call__(self, event: Any, context: Any) -> None: ... | ||
def generate_physical_id(self, event: Any): ... | ||
def create(self, func: Any): ... | ||
def update(self, func: Any): ... | ||
def delete(self, func: Any): ... | ||
def poll_create(self, func: Any): ... | ||
def poll_update(self, func: Any): ... | ||
def poll_delete(self, func: Any): ... | ||
def init_failure(self, error: Any) -> None: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from typing import Any | ||
|
||
logger: Any |