Core¶
Configuration¶
config ¶
Config ¶
Config()
Source code in docstr_health/core/config.py
15 16 17 18 19 20 21 | |
get_cache_dir ¶
get_cache_dir() -> Path
Source code in docstr_health/core/config.py
23 24 | |
set_cache_dir ¶
set_cache_dir(dir: Path) -> None
Source code in docstr_health/core/config.py
26 27 | |
get_logs_dir staticmethod ¶
get_logs_dir() -> Path
Source code in docstr_health/core/config.py
29 30 31 | |
get_sorted_statuses staticmethod ¶
get_sorted_statuses() -> list[str]
Source code in docstr_health/core/config.py
46 47 48 | |
get_version ¶
get_version() -> str
Source code in docstr_health/core/config.py
50 51 52 53 54 55 56 57 | |
get_sorted_general_stat staticmethod ¶
get_sorted_general_stat() -> list[str]
Source code in docstr_health/core/config.py
59 60 61 62 63 64 65 66 67 | |
ensure_directories ¶
ensure_directories() -> None
Source code in docstr_health/core/config.py
94 95 96 | |
Enums¶
enums ¶
Exceptions¶
exceptions ¶
DocstrHealthError ¶
Bases: Exception
GitNotInstalledError ¶
GitNotInstalledError(
message="Git are not installed on this machine. Please, install git before running this command.",
)
Bases: DocstrHealthError
Source code in docstr_health/core/exceptions.py
8 9 10 11 12 13 | |
PythonParseError ¶
PythonParseError(file_path: Path, reason: Exception)
Bases: DocstrHealthError
Raised when a Python file cannot be parsed.
Source code in docstr_health/core/exceptions.py
22 23 24 25 | |
PythonFilesNotFound ¶
PythonFilesNotFound(
message="There are no .py files in the directory being checked.",
)
Bases: DocstrHealthError
Raised when no Python files were found
Source code in docstr_health/core/exceptions.py
31 32 33 34 35 36 | |
DirectoryNotFoundError ¶
DirectoryNotFoundError(path: Path)
Bases: DocstrHealthError
Source code in docstr_health/core/exceptions.py
43 44 45 | |
NotADirectoryPathError ¶
NotADirectoryPathError(path: Path)
Bases: DocstrHealthError
Source code in docstr_health/core/exceptions.py
52 53 54 | |
Interfaces¶
interfaces ¶
Settings¶
settings ¶
AppSettings ¶
AppSettings(
doc_check: bool = False,
compact: bool = False,
no_cache: bool = False,
ignore_tests: bool = False,
short_names: bool = False,
ci: bool = False,
repo_url: str | None = None,
pypi_package: str | None = None,
threshold_bad: int | None = None,
threshold_warning: int | None = None,
threshold_special: int | None = None,
threshold_epic: int | None = None,
cache_dir: Path | None = None,
excluded: list[str] | None = None,
)
Source code in docstr_health/core/settings.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | |
from_args classmethod ¶
from_args(args: Namespace) -> AppSettings
Source code in docstr_health/core/settings.py
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | |
Logging¶
logger ¶
handler module-attribute ¶
handler = RotatingFileHandler(
config.get_logs_dir() / "app.log",
maxBytes=1000000,
backupCount=5,
encoding="utf-8",
)
Decorators¶
decorators ¶
check_all_functions_time_avg ¶
check_all_functions_time_avg(func: Callable)
Source code in docstr_health/core/decorators.py
8 9 10 11 12 13 14 15 16 | |
check_seconds ¶
check_seconds(func: Callable)
Measuring the execution time of a function.
Source code in docstr_health/core/decorators.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 | |