MCPcopy Index your code
hub / github.com/RustPython/RustPython / _from_serde

Method _from_serde

Lib/json/decoder.py:32–42  ·  view source on GitHub ↗
(cls, msg, doc, line, col)

Source from the content-addressed store, hash-verified

30 # RUSTPYTHON SPECIFIC
31 @classmethod
32 def _from_serde(cls, msg, doc, line, col):
33 pos = 0
34 # 0-indexed
35 line -= 1
36 col -= 1
37 while line > 0:
38 i = doc.index('\n', pos)
39 line -= 1
40 pos = i
41 pos += col
42 return cls(msg, doc, pos)
43
44 # Note that this exception is used from _json
45 def __init__(self, msg, doc, pos):

Callers

nothing calls this directly

Calls 2

clsClass · 0.50
indexMethod · 0.45

Tested by

no test coverage detected