MCPcopy Index your code
hub / github.com/python/mypy / convert_column

Method convert_column

mypy/fastparse.py:1888–1897  ·  view source on GitHub ↗

Apply column override if defined; otherwise return column. Column numbers are sometimes incorrect in the AST and the column override can be used to work around that.

(self, column: int)

Source from the content-addressed store, hash-verified

1886 self.is_evaluated = is_evaluated
1887
1888 def convert_column(self, column: int) -> int:
1889 """Apply column override if defined; otherwise return column.
1890
1891 Column numbers are sometimes incorrect in the AST and the column
1892 override can be used to work around that.
1893 """
1894 if self.override_column < 0:
1895 return column
1896 else:
1897 return self.override_column
1898
1899 def invalid_type(self, node: AST, note: str | None = None) -> RawExpressionType:
1900 """Constructs a type representing some expression that normally forms an invalid type.

Callers 3

visit_NameMethod · 0.95
visit_BinOpMethod · 0.95
visit_TupleMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected