diff --git a/gso/utils/helpers.py b/gso/utils/helpers.py index 48343817879a9373b01ba0f0490c6e97cc63c281..99a17a379a6473c70fce3e30f73c63a8576f4194 100644 --- a/gso/utils/helpers.py +++ b/gso/utils/helpers.py @@ -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: diff --git a/test/conftest.py b/test/conftest.py index 4475914b4141f7a90fe7988513651e7eeff3915f..414d77f94c04fb67213cdceb325e21420aa8f842 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -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. diff --git a/test/workflows/__init__.py b/test/workflows/__init__.py index b5234cb3f5a0a3a272212ddd8098a704c62c92bf..669fd75cf6b91057d0c327b0dbc111abb63e6f8f 100644 --- a/test/workflows/__init__.py +++ b/test/workflows/__init__.py @@ -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: -------