Scanner

A scanner object to find implicit dependencies.

class disseminate.builders.scanners.scanner.Scanner

A scanner object parses the contents of a file and finds implicit file dependencies.

classmethod get_scanner(extension)

Get the scanner for the given extension

classmethod scan(parameters, raise_error=True)

Scan parameters for dependencies.

Parameters
str_or_filepathUnion[str, pathlib.Path]

A string or a filepath to a filename to scan.

pathsList[pathlib.Path]

A list of directories to search.

raise_errorbool

If True (default), raise a FileNotFoundError if a dependency file could not be found.

Returns
new_infilepathsList[paths.SourcePath]

A list of infilepath dependencies.

static scan_function(content)

The function to scan content for new infilepaths.

Subclasses derive this function.