mkdocs_demo ¶
mkdocs_demo module
config ¶
config module
config ¶
This module contains MkDocstrings configuration objects.
interfaces ¶
This module contains interfaces and custom types.
ITrolling ¶
Abstract base class for implementing trolling interface.
Parameters¶
x : float The parameter x is a float, which means it can hold decimal values. It is used to store a numerical value.
n : int The parameter n is an integer that represents the number of iterations or steps in a process.
Source code in src/mkdocs_demo/config/interfaces.py
lib ¶
lib module.
factory ¶
This module contains factory functions.
command_factory ¶
The factory function takes a command as input and returns a function that, when called, executes the command and returns the exit code or None if the execution is interrupted.
Parameters¶
cmd : str The cmd parameter is a string that represents a command to be executed.
Returns¶
Callable[..., int | None] The factory function returns a callable object, which is a function. The function takes no arguments and returns either an integer or None.
Source code in src/mkdocs_demo/lib/factory.py
mkdocstrings ¶
This module contains code for auto-generating the codebase documentation.
gen_ref_pages ¶
gen_ref_pages(config: type[RefGenConfig]) -> Literal[True]
The gen_ref_pages function generates reference pages for Python modules and creates a navigation structure for them.
Parameters¶
config : type[RefGenConfig] The config parameter is of type RefGenConfig. It is used to provide configuration settings for generating reference pages.
Source code in src/mkdocs_demo/lib/mkdocstrings.py
superfluous ¶
This module contains additional trivial filler code.
TestClass ¶
Bases: object
The TestClass is a basic Python class.
Parameters¶
num_features : int The num_features parameter represents the number of input features in your model. It indicates the size of the input layer of your neural network.
hidden_layers : int The hidden_layers parameter represents the number of hidden layers in a neural network.
Source code in src/mkdocs_demo/lib/superfluous.py
get_type staticmethod ¶
get_type() -> Literal['Neural Network']
The method get_type returns the string "Neural Network".
Returns¶
Literal The string "Neural Network".
Source code in src/mkdocs_demo/lib/superfluous.py
load_model classmethod ¶
The method load_model loads a model from a given path and returns a string indicating the path from which the model was loaded.
Parameters¶
path : Path | str The path parameter is the path to the model file that needs to be loaded. It can be either a string or a Path object.
Returns¶
str A string that indicates the path from which the model was loaded.
Source code in src/mkdocs_demo/lib/superfluous.py
show_model ¶
The method show_model returns a dictionary containing the model type and information about its layers.
Returns¶
dict[str, str | int] A dictionary containing the model type and the layers of the model.
Source code in src/mkdocs_demo/lib/superfluous.py
Trolling ¶
Bases: ITrolling
The class Trolling implements the ITrolling interface.
Parameters¶
x : float The parameter x is a float, which means it can hold decimal values. It is used to store a numerical value.
n : int The parameter n is an integer that represents the number of iterations or steps in a process.
Source code in src/mkdocs_demo/config/interfaces.py
multiple property ¶
multiple: float
The function calculates the product of the variables x and n.
Returns¶
float The product of self.x and self.n.
from_dict classmethod ¶
The function from_dict takes a dictionary as input, checks if it contains the required keys, and returns an instance of the class with the dictionary values as arguments.
Parameters¶
d : dict[str, int] The parameter d is a dictionary with string keys and integer values.
Returns¶
Self The method is returning an instance of the class itself with the attributes specified in the dictionary d.
Source code in src/mkdocs_demo/lib/superfluous.py
create_trolling ¶
The function create_trolling takes a dictionary d and returns a Trolling object created from the dictionary.
Parameters¶
d : dict[str, int] A dictionary containing the data needed to create a Trolling object. The keys of the dictionary are strings representing the attributes of the Trolling object, and the values are integers representing the values of those attributes.
Returns¶
Trolling An instance of the class Trolling.
Source code in src/mkdocs_demo/lib/superfluous.py
scripts ¶
scripts module.
gen_ref_pages ¶
This module generates reference pages for MkDocstrings.
mkdocs ¶
This module generates script entrypoints for Poetry related to MkDocs.
build module-attribute ¶
build = command_factory(
cmd="mkdocs build --config-file src/mkdocs_demo/mkdocs.yml --clean --use-directory-urls"
)
serve module-attribute ¶
serve = command_factory(
cmd="mkdocs serve --config-file src/mkdocs_demo/mkdocs.yml"
)
mypy ¶
This module generates script entrypoints for Poetry related to Mypy typings generation.
precommit ¶
This module generates script entrypoints for Poetry related to pre-commit.