From 56e9b666bf637d021ae839db2eaceba66f554a86 Mon Sep 17 00:00:00 2001 From: Ethan Brooks Date: Sun, 27 Mar 2022 18:19:48 -0400 Subject: [PATCH] update docs using link redirect as per https://github.com/pdoc3/pdoc/issues/55#issuecomment-628095546 --- Makefile | 5 +- docs/doc-search.html | 141 + docs/{ => dollar_lambda}/args.html | 98 +- docs/{ => dollar_lambda}/decorators.html | 82 +- docs/{ => dollar_lambda}/error.html | 77 +- docs/dollar_lambda/index.html | 4755 ++++++++++++++++++++++ docs/{ => dollar_lambda}/key_value.html | 72 +- docs/{ => dollar_lambda}/parser.html | 288 +- docs/{ => dollar_lambda}/result.html | 109 +- docs/{ => dollar_lambda}/sequence.html | 119 +- docs/index.html | 4661 +-------------------- docs/index.js | 727 ++++ template/config.mako | 64 + template/html.mako | 464 +++ 14 files changed, 6808 insertions(+), 4854 deletions(-) create mode 100644 docs/doc-search.html rename docs/{ => dollar_lambda}/args.html (75%) rename docs/{ => dollar_lambda}/decorators.html (87%) rename docs/{ => dollar_lambda}/error.html (65%) create mode 100644 docs/dollar_lambda/index.html rename docs/{ => dollar_lambda}/key_value.html (53%) rename docs/{ => dollar_lambda}/parser.html (85%) rename docs/{ => dollar_lambda}/result.html (60%) rename docs/{ => dollar_lambda}/sequence.html (58%) create mode 100644 docs/index.js create mode 100644 template/config.mako create mode 100644 template/html.mako diff --git a/Makefile b/Makefile index 2ef9e4e..e0a668f 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,4 @@ readme: README.py .PHONY: docs docs: dollar_lambda/ - rm -rf docs/ - pdoc3 --html dollar_lambda - mv html/dollar_lambda docs/ - rm -rf html + pdoc3 --template-dir template --html dollar_lambda -o docs --force diff --git a/docs/doc-search.html b/docs/doc-search.html new file mode 100644 index 0000000..ffc4c5b --- /dev/null +++ b/docs/doc-search.html @@ -0,0 +1,141 @@ + + + + + + Search + + + + + + + +
+

+ +
+ + + + + + diff --git a/docs/args.html b/docs/dollar_lambda/args.html similarity index 75% rename from docs/args.html rename to docs/dollar_lambda/args.html index 9d6c378..562b0e4 100644 --- a/docs/args.html +++ b/docs/dollar_lambda/args.html @@ -1,21 +1,33 @@ - dollar_lambda.args API documentation - - + + + + + - -
@@ -26,6 +38,7 @@

Module dollar_lambda.args

Expand source code +Browse git
"""
 Defines the `Args` dataclass and associated functions.
@@ -33,7 +46,7 @@ 

Module dollar_lambda.args

import dataclasses import typing from dataclasses import Field, dataclass, fields -from typing import Any, Callable, Iterator, Optional, Union +from typing import Any, Callable, Iterator, Optional from dollar_lambda.key_value import KeyValue, KeyValueTuple from dollar_lambda.parser import Parser, done, flag, nonpositional, option, type_ @@ -43,7 +56,7 @@

Module dollar_lambda.args

def field( help: Optional[str] = None, metadata: Optional[dict] = None, - type: Optional[Union[type, Callable[[str], Any]]] = None, + type: Optional["type | Callable[[str], Any]"] = None, **kwargs, ) -> Field: """ @@ -55,7 +68,7 @@

Module dollar_lambda.args

An optional help string for the argument. metadata : str Identical to the `metadata` argument for [`dataclasses.field`](https://docs.python.org/3/library/dataclasses.html#dataclasses.field). - type : Optional[Union[type, Callable[[str], Any]]] + type : Optional[type | Callable[[str], Any]] A function that takes a string and returns a value just like the `type` argument for [`ArgumentParser.add_argument`](https://docs.python.org/3/library/argparse.html#type). @@ -218,7 +231,7 @@

Module dollar_lambda.args

@classmethod def parse_args( cls, *args, flip_bools: bool = True - ) -> typing.Sequence[KeyValueTuple] | typing.Dict[str, Any]: + ) -> "typing.Sequence[KeyValueTuple] | typing.Dict[str, Any]": """ Parses the arguments and returns a dictionary of the parsed values. """ @@ -233,7 +246,7 @@

Module dollar_lambda.args

Functions

-def field(help: Optional[str] = None, metadata: Optional[dict] = None, type: Union[type, Callable[[str], Any], ForwardRef(None)] = None, **kwargs) ‑> dataclasses.Field +def field(help: Optional[str] = None, metadata: Optional[dict] = None, type: Optional[ForwardRef('type | Callable[[str], Any]')] = None, **kwargs) -> dataclasses.Field

This is a thin wrapper around dataclasses.field.

@@ -243,7 +256,7 @@

Parameters

An optional help string for the argument.
metadata : str
Identical to the metadata argument for dataclasses.field.
-
type : Optional[Union[type, Callable[[str], Any]]]
+
type : Optional[type | Callable[[str], Any]]
A function that takes a string and returns a value just like the type argument for ArgumentParser.add_argument.
@@ -253,11 +266,12 @@

Returns

Expand source code +Browse git
def field(
     help: Optional[str] = None,
     metadata: Optional[dict] = None,
-    type: Optional[Union[type, Callable[[str], Any]]] = None,
+    type: Optional["type | Callable[[str], Any]"] = None,
     **kwargs,
 ) -> Field:
     """
@@ -269,7 +283,7 @@ 

Returns

An optional help string for the argument. metadata : str Identical to the `metadata` argument for [`dataclasses.field`](https://docs.python.org/3/library/dataclasses.html#dataclasses.field). - type : Optional[Union[type, Callable[[str], Any]]] + type : Optional[type | Callable[[str], Any]] A function that takes a string and returns a value just like the `type` argument for [`ArgumentParser.add_argument`](https://docs.python.org/3/library/argparse.html#type). @@ -344,6 +358,7 @@

Classes

Expand source code +Browse git
@dataclass
 class Args:
@@ -430,7 +445,7 @@ 

Classes

@classmethod def parse_args( cls, *args, flip_bools: bool = True - ) -> typing.Sequence[KeyValueTuple] | typing.Dict[str, Any]: + ) -> "typing.Sequence[KeyValueTuple] | typing.Dict[str, Any]": """ Parses the arguments and returns a dictionary of the parsed values. """ @@ -439,18 +454,19 @@

Classes

Static methods

-def parse_args(*args, flip_bools: bool = True) ‑> Union[Sequence[KeyValueTuple], Dict[str, Any]] +def parse_args(*args, flip_bools: bool = True) -> Union[Sequence[KeyValueTuple], Dict[str, Any]]

Parses the arguments and returns a dictionary of the parsed values.

Expand source code +Browse git
@classmethod
 def parse_args(
     cls, *args, flip_bools: bool = True
-) -> typing.Sequence[KeyValueTuple] | typing.Dict[str, Any]:
+) -> "typing.Sequence[KeyValueTuple] | typing.Dict[str, Any]":
     """
     Parses the arguments and returns a dictionary of the parsed values.
     """
@@ -458,7 +474,7 @@ 

Static methods

-def parser(flip_bools: bool = True) ‑> Parser[Sequence[KeyValue[typing.Any]]] +def parser(flip_bools: bool = True) -> Parser[Sequence[KeyValue[typing.Any]]]

Returns a parser for the dataclass. @@ -487,6 +503,7 @@

Examples

Expand source code +Browse git
@classmethod
 def parser(cls, flip_bools: bool = True) -> Parser[Sequence[KeyValue[Any]]]:
@@ -527,6 +544,52 @@ 

Examples