speechbrain.utils.check_docstrings module

This library contains functions that checks the dosctrings

Authors
  • Mirco Ravanelli 2022

Summary

Functions:

check_docstrings

Checks if all the functions or classes have a docstring.

extractName

Extracts the names of the function or classes in the input string.

Reference

speechbrain.utils.check_docstrings.extractName(s, search_class=False)[source]

Extracts the names of the function or classes in the input string.

Parameters
  • s (string) – Input string where to search for function or class names.

  • search_clas (bool) – If True, searches for class names.

Returns

string – Name of the function or class detected.

Return type

string

speechbrain.utils.check_docstrings.check_docstrings(base_folder='.', check_folders=['speechbrain', 'tools', 'templates'])[source]

Checks if all the functions or classes have a docstring.

Parameters
  • base_folder (path) – The main folder of speechbrain.

  • check_folders (list) – List of subfolders to check.

Returns

check – True if all the functions/classes have a docstring, False otherwise.

Return type

bool