Formatter¶
Our very own flake8 formatter for better error messages.
That’s how all flake8 formatters work:
graph LR
F2[start] --> F3[after_init]
F3 --> F4[start]
F4 --> F5[beginning]
F5 --> F6[handle]
F6 --> F7[format]
F6 --> F8[show_source]
F6 --> F9[show_statistic]
F7 --> F10[finished]
F8 --> F10[finished]
F9 --> F10[finished]
F10 -.-> F5
F10 --> F11[stop]
flake8 formatting API calls order.¶
- class WemakeFormatter(options)[source]¶
Bases:
BaseFormatterWe need to format our style violations beautifully.
The default formatter does not allow us to do that. What things do we miss?
Spacing, everything is just mixed up and glued together
Colors and decoration, some information is easier to gather just with colors or underlined text
Grouping, we need explicit grouping by filename
Incomplete and non-informative statistics