stylist.rule

None language specific rules.

Classes

LimitLineLength([length, ...])

Report instances of lines being too long.

Rule()

Abstract parent of all rules.

TrailingWhitespace()

Examines the text for white space at the end of lines.

class stylist.rule.LimitLineLength(length=79, ignore_leading_whitespace=False)

Bases: Rule

Report instances of lines being too long.

examine(subject)

Examines the provided source code object for issues.

Parameters:

subject (SourceText) – The source file to be examined.

Return type:

List[Issue]

Returns:

All issues found with the source.

class stylist.rule.Rule

Bases: ABC

Abstract parent of all rules.

abstract examine(subject)

Examines the provided source code object for issues.

Parameters:

subject – The source file to be examined.

Return type:

List[Issue]

Returns:

All issues found with the source.

class stylist.rule.TrailingWhitespace

Bases: Rule

Examines the text for white space at the end of lines. This includes lines which consist entirely of white space.

examine(subject)

Examines the provided source code object for issues.

Parameters:

subject (SourceText) – The source file to be examined.

Return type:

List[Issue]

Returns:

All issues found with the source.