MCPcopy Create free account
hub / github.com/PyCQA/flake8 / update_state

Method update_state

src/flake8/processor.py:164–170  ·  view source on GitHub ↗

Update the indent level based on the logical line mapping.

(self, mapping: _LogicalMapping)

Source from the content-addressed store, hash-verified

162 self.blank_lines += 1
163
164 def update_state(self, mapping: _LogicalMapping) -> None:
165 """Update the indent level based on the logical line mapping."""
166 (start_row, start_col) = mapping[0][1]
167 start_line = self.lines[start_row - 1]
168 self.indent_level = expand_indent(start_line[:start_col])
169 if self.blank_before < self.blank_lines:
170 self.blank_before = self.blank_lines
171
172 def update_checker_state_for(self, plugin: LoadedPlugin) -> None:
173 """Update the checker_state attribute for the plugin."""

Callers 1

run_logical_checksMethod · 0.80

Calls 1

expand_indentFunction · 0.85

Tested by

no test coverage detected