_docsweeper.docsweeper#
Main module for docsweeper functionality.
- class _docsweeper.docsweeper.DocumentedToken#
Bases:
NamedTupleData class for a python code token.
Note
This class is exported publicly as
docsweeper.DocumentedToken.
- class _docsweeper.docsweeper.DocumentedTokenStatistic#
Bases:
NamedTupleStatistics about the docstring history of a
DocumentedToken.Note
This class is exported publicly as
docsweeper.DocumentedTokenStatistic.- code_changes: int#
How often the body of the token was changed since
last_docstring_change.
- _docsweeper.docsweeper.analyze_file(vcs_command_set_type, vcs_command_set_config, path)#
Analyzes code file at path and return its documented token statistics.
- Parameters
vcs_command_set_type (Type[VCSCommandSet]) – type of the version control system to use
vcs_command_set_config (VCSCommandSetConfig) – version control configuration
path (Path) – points to the code file in the file system
- Raises
VCSExecutableError – if there is an unexpected error with the executable set in vcs_command_set_config
ParserError – if there is an unexpected error parsing path
- Returns
each entry of the list consists of the documented token, and its docstring history statistic
- Return type
Note
This function is exported publicly as
docsweeper.analyze_file.
- class _docsweeper.docsweeper.ParserError#
Raised when a code file could not be parsed.
- __init__(file_, error)#
file_ was not parseable due to underlying parser error error.
- Parameters
file_ (Path) –
error (SyntaxError) –
- Return type
None