Strings
mypy-boto3-builder Index / Mypy Boto3 Builder / Utils / Strings
Auto-generated documentation for mypy_boto3_builder.utils.strings module.
- Strings
- get_anchor_link
- get_botocore_class_name
- get_class_prefix
- get_line_with_indented
- get_short_docstring
- is_reserved
get_anchor_link
Convert header to markdown anchor link.
Signature
def get_anchor_link(text: str) -> str:
...
get_botocore_class_name
Get Botocore class name from Service metadata.
Signature
def get_botocore_class_name(metadata: dict[str, str]) -> str:
...
get_class_prefix
Get a valid Python class prefix from func_name
.
Arguments
func_name
- Any string.
Returns
String with a class prefix.
Signature
def get_class_prefix(func_name: str) -> str:
...
get_line_with_indented
Get first line of the string with all indented lines.
Fixes invalid unindent.
Arguments
input_string
- Input string.
Returns
A string with first line and following indented lines.
Signature
def get_line_with_indented(input_string: str, multi_first_line: bool = False) -> str:
...
get_short_docstring
Create a short docstring from boto3 documentation.
Trims docstring to 300 chars.
Removes double and triple backticks.
Stops on **Request syntax**
and ::
.
Ensures that backticks are closed.
Replaces Text <link>
with Text.
Wraps docstring to 80 chars.
Signature
def get_short_docstring(doc: str) -> str:
...
is_reserved
Check whether varialbe name conflicts with Python reserved names.
Signature
def is_reserved(word: str) -> bool:
...