BaseAnalyzer#

class neophile.analysis.base.BaseAnalyzer#

Bases: ABC

Base class for an analysis step.

Attributes Summary

name

Name of the analyzer type.

Methods Summary

analyze(root, *[, update])

Analyze a tree and return a list of needed changes.

update(root)

Analyze a tree and apply updates.

Attributes Documentation

name#

Name of the analyzer type.

String representing the type of analyzer this is. Used for reporting results accumulated from a bunch of analyzers.

Methods Documentation

abstract async analyze(root, *, update=False)#

Analyze a tree and return a list of needed changes.

Parameters:
  • root (Path) – Root of the path to analyze.

  • update (bool, default: False) – If set to True, leave the update applied if this is more efficient. Used by analyzers like the Python frozen dependency analyzer that have to do work and apply the update to see if any update is necessary. They can then mark the returned update as already applied and not have to run it twice.

Returns:

List of updates found.

Return type:

list of Update

async update(root)#

Analyze a tree and apply updates.

Returns:

List of updates applied.

Return type:

list of Update

Parameters:

root (Path) –