mod eb_style

module eb_style

EasyBuild easyconfig physical-line style (pycodestyle E501, max 120).

EasyBuild’s eb --check-contrib runs pycodestyle with a 120-column limit. Product content (which -D flags) is residual judgment; wrapping long string assignments so each physical line is ≤120 is mechanical and must not burn residual-agent turns.

The linter reports physical lines longer than EB_MAX_LINE (E501). The formatter rewrites long single-quoted or double-quoted assignments such as key = '…' and key += "…" into parenthesized adjacent string literals. It also wraps long # comment lines using the patterns maintainers use by hand.

Variables

const EB_MAX_LINE: usize

EasyBuild / pycodestyle easyconfig max line length.

Functions

fn format_style(text: &str) -> FormatStyleResult

Rewrite fixable long lines; leave other long lines intact (still reported).

fn format_style_file(path: &Path, out: Option<&Path>) -> Result<FormatStyleResult, StyleError>

Format a file in place (or write to out if set). Returns the format result.

fn line_is_mechanically_fixable(line: &str) -> bool

True when format_style rewrites this physical line.

fn lint_style(text: &str) -> Vec<StyleFinding>

Lint every physical line for E501.

Enums

enum StyleError

Why a style pass could not run.

Io(String)

The file could not be read or written.

Structs and Unions

struct FormatStyleResult

Result of a format pass.

text: String

The formatted source.

lines_rewritten: usize

Number of physical lines that were rewritten.

remaining: Vec<StyleFinding>

Findings still present after format (non-fixable long lines).

struct StyleFinding

One style finding (currently E501 only).

line: usize

1-based line number.

column: usize

1-based column where the line exceeds the limit (usually 121).

code: String

pycodestyle code (E501).

message: String

Human-readable description of the finding.

mechanical: bool

True when format_style can rewrite this line deterministically.

Implementations

impl StyleFinding

Functions

fn e501(line: usize, len: usize, mechanical: bool) -> Self

A long-line finding for line, which is len characters.

Traits implemented

impl fmt::Display for StyleFinding