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