MCPcopy Create free account
hub / github.com/PyQt5/PyQt / initUi

Method initUi

Test/ChartView/ChartView.py:43–53  ·  view source on GitHub ↗
(self, file)

Source from the content-addressed store, hash-verified

41 self.initUi(file)
42
43 def initUi(self, file):
44 if isinstance(file, dict):
45 return self.__analysis(file)
46 if isinstance(file, str):
47 if not os.path.isfile(file):
48 return self.__analysis(json.loads(file))
49 with open(file, "rb") as fp:
50 data = fp.read()
51 encoding = chardet.detect(data) or {}
52 data = data.decode(encoding.get("encoding") or "utf-8")
53 self.__analysis(json.loads(data))
54
55 # def onSeriesHoverd(self, point, state):
56 # print(point, state)

Callers 1

__init__Method · 0.95

Calls 1

__analysisMethod · 0.95

Tested by

no test coverage detected