Skip to content
Snippets Groups Projects
Commit bf2feedf authored by Karel van Klink's avatar Karel van Klink :smiley_cat:
Browse files

remove some google-style docstrings

parent d54a5240
No related branches found
No related tags found
1 merge request!132Update documentation
Pipeline #85217 passed
......@@ -251,14 +251,11 @@ def validate_interface_name_list(interface_name_list: list, vendor: str) -> list
another forward slash '/', and ends with a digit between 0 and 9.
For example: 'xe-1/0/0'.
Args:
----
interface_name_list: List of interface names to validate.
vendor: Router vendor to check interface names
Returns:
-------
list: The list of interface names if all match was successful, otherwise it will throw a ValueError exception.
:param list interface_name_list: List of interface names to validate.
:param str vendor: Router vendor to check interface names
:return list: The list of interface names if all match was successful, otherwise it will throw a ValueError
exception.
"""
# For Nokia nothing to do
if vendor == RouterVendor.NOKIA:
......
......@@ -224,13 +224,8 @@ def db_uri():
def run_migrations(db_uri: str) -> None:
"""Configure the alembic migration and run the migration on the database.
Args:
----
db_uri: The database uri configuration to run the migration on.
Returns:
-------
None
:param str db_uri: The database uri configuration to run the migration on.
:return: None
"""
path = Path(__file__).resolve().parent
app_settings.DATABASE_URI = db_uri
......@@ -251,9 +246,7 @@ def run_migrations(db_uri: str) -> None:
def _database(db_uri):
"""Create database and run migrations and cleanup after wards.
Args:
----
db_uri: The database uri configuration to run the migration on.
:param db_uri: The database uri configuration to run the migration on.
"""
db.update(Database(db_uri))
url = make_url(db_uri)
......@@ -306,9 +299,7 @@ def _db_session(_database):
- Each test runs in isolation with a pristine database state.
- Avoids the overhead of recreating the database schema or re-seeding data between tests.
Args:
----
database: A fixture reference that initializes the database.
:param _database: A fixture reference that initializes the database.
"""
with contextlib.closing(db.wrapped_database.engine.connect()) as test_connection:
# Create a new session factory for this context.
......
......@@ -254,16 +254,12 @@ def run_form_generator(
make sure that anything in extra_inputs matched the values and types as if the pydantic validation has
been run.
Args:
----
form_generator (FormGenerator): The form generator that will be run.
extra_inputs (list[State] | None): list of user input dicts for each page in the generator.
If no input is given for a page, an empty dict is used.
The default value from the form is used as the default value for a field.
Returns:
-------
tuple[list[dict], State]: A list of generated forms and the result state for the whole generator.
:param FormGenerator form_generator: The form generator that will be run.
:param list[State] | None extra_inputs: list of user input dicts for each page in the generator.
If no input is given for a page, an empty dict is used.
The default value from the form is used as the default value for a field.
:return tuple[list[dict], State]: A list of generated forms and the result state for the whole generator.
Example:
-------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment